Skip to main content

SQLAlchemy fields

Project description

SQLAlchemy Fields

Build Status Publish Status Coverage Package version Supported Python versions


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

  • EmailType
  • FileType
  • ImageType
  • IPAddressType
  • URLType
  • UUIDType
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

  • FileSystemStorage
  • S3Storage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy_fields-0.5.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_fields-0.5.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy_fields-0.5.0.tar.gz.

File metadata

  • Download URL: sqlalchemy_fields-0.5.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for sqlalchemy_fields-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b30022d73b69696f1e76bddfce55d59555361c25a4be572efa87a22f237349ec
MD5 145ce022b5f6f71765961cb5a136e679
BLAKE2b-256 ebe53235a01aef002472a741c43ecbc9337c192d66f7aa64d78ceaf3f9908ed6

See more details on using hashes here.

File details

Details for the file sqlalchemy_fields-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_fields-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 601298a808b3d873224a8dd1febc774e58f720556c3f995a5975e77195b55408
MD5 1394e4e9f3e8df0bf488a0bc3add3ab9
BLAKE2b-256 b628b60ce2d69be492dfffa1b6bec7657f15b02b25ec676a1736fc9429b2e2de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page