Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Ginodantic

Generate pydantic schema from gino models

Python 3.7+
Install: pip install ginodantic

Github: https://github.com/Basalex/ginodantic

Generating custom schemas
  • Meta Class Options
    • as_dataclass: bool -> pydantic dataclass will be used for generated schema

    • as_list_fields: Tuple[str] -> listed fields will be generated as List[type]

    • field_methods: bool -> int and float fields will be generated with postfix __ge, and postfix __le,

    • field_methods_by_name: Dict[str, List[str]] -> use database field names instead of model field names

    • fields: Tuple[str] -> only listed fields will be used for generated schema

    • field_methods: Tuple[str] -> excludes listed fields from generated schema

    • exclude: Tuple[str] -> excludes listed fields from generated schema

    • list_pk: bool -> Foreign key and primary key will be interpreted as list

    • required: Tuple[str] -> only listed fields will be defined as required, can be set as empty tuple

    • use_db_names: bool -> use database field names instead of model field names

Examples of usage:

from ginodantic import BaseModelSchema

class UserSchema(BaseModelSchema):
    class Meta:
        model: User
        required: ()
        exclude: ('email', )
        use_db_names: False
        field_methods_by_name = {'age': ('le', 'ge')}
This would be almost equal to the following schema
class UserSchema(BaseModel):
    id: Optional[int] = None
    username: Optional[str] = None
    age__le: Optional[str] = None
    age__ge: Optional[str] = None

Metadata

Release files for ginodantic 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ginodantic 0.1.0b2
File Size Uploaded Provenance Actions
ginodantic-0.1.0b2.tar.gz 5.3 kB Without provenance Details for ginodantic-0.1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ginodantic 0.1.0b2
File Interpreter ABI Platform Actions
ginodantic-0.1.0b2-py3-none-any.whl Python 3 none any Details for ginodantic-0.1.0b2-py3-none-any.whl

Total release size: 11.7 kB

Release files / ginodantic-0.1.0b2.tar.gz

Download URL ginodantic-0.1.0b2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e998e7cdea2c56876e75e6c21ab1621709736b50630af3c5070d50389e06a892
BLAKE2b-256 checksum
How to use checksums
a5528dd8c682976e846361b9cb6664ec68d00abf1c754385ce5eaceb11104951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

Release files / ginodantic-0.1.0b2-py3-none-any.whl

Download URL ginodantic-0.1.0b2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78e8554dcb62ea89308837fe79bff79befa16962c540feb7349738998489175b
BLAKE2b-256 checksum
How to use checksums
58fb14bbbf8b4f94be08f1749c4b0d4563a2f64c68b3b65470a2133a4b63052b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

Security for ginodantic 0.1.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page