SQLAlchemy Fields
Documentation: https://aminalaee.dev/sqlalchemy-fields
Source Code: https://github.com/aminalaee/sqlalchemy-fields
Table of Contents
Installation
pip install sqlalchemy-fields
pip install 'sqlalchemy-fields[full]'
Custom Types
EmailTypeFileTypeImageTypeIPAddressTypeURLTypeUUIDType
from sqlalchemy import Column, Integer, create_engine
from sqlalchemy.orm import Session, declarative_base
from sqlalchemy_fields.types import IPAddressType
Base = declarative_base()
engine = create_engine("sqlite:///example.db")
class Example(Base):
__tablename__ = "example"
id = Column(Integer, primary_key=True)
ip = Column(IPAddressType)
example = Example(ip="127.0.0.1")
with Session(engine) as session:
session.add(example)
session.commit()
print(example.ip)
"""
IPv4Address("127.0.0.1")
"""
Storages
FileSystemStorageS3Storage
Metadata
Release files for sqlalchemy-fields 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sqlalchemy_fields-0.5.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqlalchemy_fields-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.0 kB
Release files / sqlalchemy_fields-0.5.0.tar.gz
| Download URL | sqlalchemy_fields-0.5.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b30022d73b69696f1e76bddfce55d59555361c25a4be572efa87a22f237349ec
|
|
BLAKE2b-256 checksum How to use checksums |
ebe53235a01aef002472a741c43ecbc9337c192d66f7aa64d78ceaf3f9908ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Release files / sqlalchemy_fields-0.5.0-py3-none-any.whl
| Download URL | sqlalchemy_fields-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
601298a808b3d873224a8dd1febc774e58f720556c3f995a5975e77195b55408
|
|
BLAKE2b-256 checksum How to use checksums |
b628b60ce2d69be492dfffa1b6bec7657f15b02b25ec676a1736fc9429b2e2de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|