FastSprout - Core library for FastSprout framework.
Project description
fastsprout-core
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 protocols —
BaseAction,BaseSequenceAction,BaseIterableAction,BaseIteratorAction(+ trigger variants),BaseActionGroup. One protocol per return shape: single value,Sequence[O],Iterable[O],AsyncIterator[O]. - Schema —
BaseSchemawith snake↔camel aliasing, declares fields asField[T]. - Typed fields —
Field[T],FieldRef[E, T, OrmCtor],FieldAssignment[T],HasOrm[OrmCtor]. - Decorators —
@typed_fields,@typed_dataclass,@typed_pydantic_dataclass,TypedModelMeta. - Identifiers, errors, DI —
IDType(UUID v7),FastSproutError,Depends. - mypy plugin — refines
FieldRef.ormtoOrmCtor[T]. Enable withplugins = ["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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9af1e7789b6b5214d80e9169d92a5d3613c7afda29a8f702b8897a4e7664dd75
|
|
| MD5 |
10172a13f66140f973725461f8d0927d
|
|
| BLAKE2b-256 |
34c48e1b8fe91c4e22660617abddbf8f650f57ade1993974c14458eef3b33d8d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee634e72e43155c19eca23b385b3532dfb3ea58fcaadb7b9fee87c99adede79
|
|
| MD5 |
c7b441e1bfe1c4d166573604440febde
|
|
| BLAKE2b-256 |
94fd17e3a93361523b81c2d263651690969c77cc99b5da1ccb959c69e820c1d2
|