Skip to main content

FastSprout - Core library for FastSprout framework.

Project description

fastsprout-core

PyPI version Python versions License: Apache 2.0 Downloads Typed CI

Core contracts for the FastSprout framework.

Foundation package — base protocols, types, exceptions and the typed-field layer that every other fastsprout-* package builds on. No dependencies on other framework packages.

Install

pip install fastsprout-core

Quick look

from fastsprout_core.schema import BaseSchema
from fastsprout_core.fields import Field


class Hero(BaseSchema):
    id: Field[int]
    name: Field[str]


hero = Hero(id=1, name="SuperMan")
hero.name                    # "SuperMan"   (str)
Hero.name                    # <Hero.name>  (FieldRef[Hero, str, None])
Hero.name.set("Spider")      # FieldAssignment(name='name', value='Spider')

See examples/ for one runnable file per feature.

What's inside

  • Action protocolsBaseAction, BaseSequenceAction, BaseIterableAction, BaseIteratorAction (+ trigger variants), BaseActionGroup. One protocol per return shape: single value, Sequence[O], Iterable[O], AsyncIterator[O].
  • SchemaBaseSchema with snake↔camel aliasing, declares fields as Field[T].
  • Typed fieldsField[T], FieldRef[E, T, OrmCtor], FieldAssignment[T], HasOrm[OrmCtor].
  • Decorators@typed_fields, @typed_dataclass, @typed_pydantic_dataclass, TypedModelMeta.
  • Identifiers, errors, DIIDType (UUID v7), FastSproutError, Depends.
  • mypy plugin — refines FieldRef.orm to OrmCtor[T]. Enable with plugins = ["fastsprout_core.mypy_plugin"] in [tool.mypy].

Python

3.12, 3.13, 3.14. CI runs the full pipeline on each, including PEP 749 lazy-annotation paths.

See CHANGELOG.md for what's in each version.

Links

License

Apache License 2.0 — see LICENSE

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

fastsprout_core-1.1.0.tar.gz (89.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastsprout_core-1.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file fastsprout_core-1.1.0.tar.gz.

File metadata

  • Download URL: fastsprout_core-1.1.0.tar.gz
  • Upload date:
  • Size: 89.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastsprout_core-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9af1e7789b6b5214d80e9169d92a5d3613c7afda29a8f702b8897a4e7664dd75
MD5 10172a13f66140f973725461f8d0927d
BLAKE2b-256 34c48e1b8fe91c4e22660617abddbf8f650f57ade1993974c14458eef3b33d8d

See more details on using hashes here.

File details

Details for the file fastsprout_core-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastsprout_core-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastsprout_core-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ee634e72e43155c19eca23b385b3532dfb3ea58fcaadb7b9fee87c99adede79
MD5 c7b441e1bfe1c4d166573604440febde
BLAKE2b-256 94fd17e3a93361523b81c2d263651690969c77cc99b5da1ccb959c69e820c1d2

See more details on using hashes here.

Supported by

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