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.2.tar.gz (91.4 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.2-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastsprout_core-1.1.2.tar.gz
  • Upload date:
  • Size: 91.4 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.2.tar.gz
Algorithm Hash digest
SHA256 6caee92a61dc161dc5848a65b02836adc7d120fac641fe8a77e03189d48ca568
MD5 14447bf8f770a9afcbefe2285988ad3d
BLAKE2b-256 cb476ce53d04eccc74430572239629155b8e2d808167f740ef5e6b67db89083e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastsprout_core-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afa5ec974545e4a021876a821a8c77d04d7cda51221ff4007d3ecc44b25ff8b6
MD5 bf43631401449db3bb199d883ba0b1d9
BLAKE2b-256 220ed3d0d748c906a394bc9ac2a41ab5fa3a007e2b75a13072de647a2aec01e0

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.1

2 files

1.2.0

2 files

This release

1.1.2 This release

2 files

1.1.1

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