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
The Duck-ORM
package is an asynchronous ORM for Python, with support for Postgres and SQLite. ORM is built with:
Requirements: Python 3.8+
Duck-ORM is still under development.
$ pip install duck-orm
!!! note
Don't forget to install databases
before installing duck-orm
.
For this example we will create a connection to the SQLite database and create a model.
$ pip install databases[sqlite]
$ pip install ipython
Note that we want to use ipython
here, because it supports using await expressions directly from the console.
from databases import Database
from duck_orm.model import Model
db = Database('sqlite:///example.db')
await db.connect()
from duck_orm.sql import fields as Field
class Person(Model):
__tablename__ = 'persons'
__db__ = db
id: int = Field.Integer(primary_key=True, auto_increment=True)
first_name: str = Field.String(unique=True)
last_name: str = Field.String(not_null=True)
age: int = Field.BigInteger(min_value=18)
# Table creation in the database.
await Person.create()
__tablename__
attribute is used to define the table's name in the database.__db__
attribute is the instance of the database connection.DuckORM
is built as an open-source tool and remains completely free(MIT license).
FAQs
ORM Async for Python
We found that duck-orm 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.