Skip to main content

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

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.1.tar.gz (91.3 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.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastsprout_core-1.1.1.tar.gz
  • Upload date:
  • Size: 91.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fastsprout_core-1.1.1.tar.gz
Algorithm Hash digest
SHA256 b136244fd41dd606a53a6153297ffc19019091977d60ff55e7457f6a79ed55bb
MD5 ee69c7ad7ddcb13db5f47e99a69faa54
BLAKE2b-256 69407de5d02a5acdbe672ea6d1b7e9b66ec9085fea8d82469729bda15e920e51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastsprout_core-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b84023266469a849c490215277482d57e061ae835b8508aa0cb04847c5e8ddc
MD5 204f746f93b591509184d8ee12ca3fab
BLAKE2b-256 dd3c4922de2d3b34a02ac4f2a6a46ef054d98e7710943902c5f22f933a60ec52

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

This release

1.1.1 This release

2 files

1.1.0

2 files

1.0.0

2 files

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