Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
ORM library to build SQLite based application in format model/dao/service.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
At first, you need SQLite3 to be installed. Type following in your terminal:
apt-get install libsqlite3-dev
To install the package type the following in your terminal:
sudo pip install sqller
To run tests type the following in your terminal:
python3 -m pytest
or
python -m pytest
if the previous command doesn't work.
The usage of the library in real application consists of the following steps:
The steps are described below.
class Chat(metaclass=sqller.ModelMeta):
NAME = 'chats'
FIELDS = [
Field(name="id", dtype="integer", postfix="PRIMARY KEY"),
Field(name="type", dtype="text"),
Field(name="last_name", dtype="text"),
Field(name="first_name", dtype="text"),
Field(name="username", dtype="text"),
Field(name="chat_id", dtype="integer")
]
class ChatDAO(metaclass=sqller.DAOMeta):
MODEL = Chat
class TelegramService(metaclass=sqller.ServiceMeta):
DB_PATH = config.DATABASE_PATH
MODELS = [
models.Chat,
models.SelectedCriterion
]
@staticmethod
def save_chat_info(chat: telebot.types.Chat):
obj_exist_checker = models.Chat(id=chat.id)
obj = models.Chat(
type = chat.type,
last_name = chat.last_name,
first_name = chat.first_name,
username = chat.username,
chat_id=chat.id
)
sql_exists = dao.ChatDAO.sql_exists(obj_exist_checker)
sql_save = dao.ChatDAO.sql_save(obj)
exists = TelegramService.execute(sql_exists)[0][0]
if not exists:
TelegramService.execute(sql_save)
TelegramService.save_chat_info(chat)
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
ORM library to build SQLite based application in format model/dao/service.
We found that sqller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.