Metadata-Version: 2.1
Name: sqlalchemy-fields
Version: 0.1.0
Summary: SQLAlchemy fields
Project-URL: Documentation, https://github.com/aminalaee/sqlalchemy-fields#readme
Project-URL: Issues, https://github.com/aminalaee/sqlalchemy-fields/issues
Project-URL: Source, https://github.com/aminalaee/sqlalchemy-fields
Author-email: Amin Alaee <me@aminalaee.dev>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: django,orm,sqlalchemy
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Typing :: Typed
Requires-Python: >=3.7
Requires-Dist: email-validator~=1.3
Requires-Dist: sqlalchemy<1.5,>=1.4
Description-Content-Type: text/markdown

# SQLAlchemy Fields

[![PyPI - Version](https://img.shields.io/pypi/v/sqlalchemy-fields.svg)](https://pypi.org/project/sqlalchemy-fields)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqlalchemy-fields.svg)](https://pypi.org/project/sqlalchemy-fields)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install sqlalchemy-fields
```

## Extra SQLAlchemy column types

- Email
- File
- IP
- URL
- UUID

```python
from sqlalchemy import Column, Integer, create_engine
from sqlalchemy.orm import Session, declarative_base
from sqlalchemy_fields.types import IPAddress

Base = declarative_base()
engine = create_engine("sqlite:///example.db")

class Example(Base):
    __tablename__ = "example"

    id = Column(Integer, primary_key=True)
    ip = Column(IPAddress)


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")
"""
```
