Skip to main content

The squire to your python projects.

Project description

Escudeiro

The squire to your Python projects.

Escudeiro is a modern, extensible toolkit for Python that brings together advanced data modeling, configuration, utilities, and high-performance Rust-powered extensions. It is designed for developers who want robust, ergonomic, and efficient solutions for building complex Python applications.


Features

  • Slots-first, Descriptor-friendly Data Classes
    Escudeiro’s data module is an attrs-like, slots-first data modeling system. It natively supports Python __slots__, advanced descriptors (like lazy fields and lazymethods), and is designed for extensibility.

    • Out-of-the-box support for lazy fields, slotted descriptors, and custom field types.
    • Integrates seamlessly with async and sync lazy evaluation.
    • Serialization/deserialization to dict/JSON, schema generation, and type variable resolution.
  • Configuration Management
    Flexible configuration loading from environment variables, files, and mappings, with type-safe casting and validation.

  • Utilities & Helpers
    A rich set of helpers for type casting, lazy evaluation, async utilities, string manipulation, and more.

  • Autodiscovery
    Dynamic and static discovery of modules and objects at runtime, supporting plugin-like architectures.

  • Rust-powered Performance
    Performance-critical components are implemented in Rust (via PyO3), including file tree management and string utilities.


Installation

pip install escudeiro

Requires Python 3.12+.

Quick Start

Data modeling and descriptors:

from escudeiro.data import data, field
from escudeiro.lazyfields import lazyfield

@data
class User:
    name: str = field()
    age: int = field(default=0)

    @lazyfield
    def expensive_computation(self):
        print("Computing...")
        return self.age * 2

user = User(name="Alice", age=21)
print(user.expensive_computation)  # "Computing..." then 42
print(user.expensive_computation)  # 42 (cached)

Asynchronous lazy evaluation:

from escudeiro.lazyfields import asynclazyfield
import asyncio

@data
class Resource:
    @asynclazyfield
    async def load(self):
        await asyncio.sleep(1)
        return "loaded"

async def main():
    r = Resource()
    print(await r.load())  # "loaded"

asyncio.run(main())

File tree management with Rust:

from escudeiro.filetree import FileTree

tree = FileTree(base_dir="my_project")
vt = tree.virtual
vt.create_text_file("README.md", content="# My Project")
tree.write()

Integrations

  • Optional support for Pydantic for data validation and settings management.
  • Optional support for msgspec for high-performance serialization/deserialization.

Install with:

pip install escudeiro[pydantic,msgspec]

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Contributing

We welcome contributions! Please open an issue or submit a pull request on GitHub.

Changelog

See the CHANGELOG for a detailed list of changes and updates.

Author

Escudeiro is developed and maintained by me.

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

escudeiro-0.2.8.tar.gz (198.9 kB view details)

Uploaded Source

Built Distributions

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

escudeiro-0.2.8-cp313-cp313-musllinux_1_1_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.1+ x86-64

escudeiro-0.2.8-cp313-cp313-manylinux_2_34_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

escudeiro-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

escudeiro-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

escudeiro-0.2.8-cp312-cp312-manylinux_2_34_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

escudeiro-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

File details

Details for the file escudeiro-0.2.8.tar.gz.

File metadata

  • Download URL: escudeiro-0.2.8.tar.gz
  • Upload date:
  • Size: 198.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.7

File hashes

Hashes for escudeiro-0.2.8.tar.gz
Algorithm Hash digest
SHA256 be71279ce64bec4f641761279e02600f96f2b56619fb82a41d403d1f5c29ca0e
MD5 08382029588be99ccb202df29a7dedf3
BLAKE2b-256 25bbf43863847e3b2895fcb00977dd298a64ffa332f064333aab26705f0b0ada

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp313-cp313-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c8b22ed3bb4cfa38d6d58c6b45e0d349a0da8f0eb1ed73c8b366a9124b0edd2d
MD5 80f8f538b3132cc7fe33a6b9d395df38
BLAKE2b-256 2bc1d96afd474b0f9390b142105588e78573dd43798ee23149665350f920fb85

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4355b5c91a83b0de89edb6119bbda0b5a4a64ee06a58fafb2845abbb348fd79e
MD5 83f1af7358136412d9edd2aee0006c49
BLAKE2b-256 4dc2034de279dd573db0e2edd5b67337c6311e44051112b73a62664a9d3d41ce

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d1c21cd309a9a17dd0dfd9520257569d4342b257e9ff2ddb82315a4754dd9d9e
MD5 134a03a880c6288d7000a0e3233ffcc0
BLAKE2b-256 7b5d0a54be197676cb1f4f304507329235e97790a28eabb73ed5eb1a65edfe76

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 713c4f67e8fca17955e75af97f7c8cefc463d2ea4f1fe0ca8a72ac00a0758856
MD5 116ec368214df7ebef5c9b87a3ee3cce
BLAKE2b-256 e5a6b63f971db8f37965714b9e3e8f681df002a474d3e3c152d0ab33889fcf3e

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 93f8508420430aadca252f3636ce31f3a7897d89b824871828489558ad003755
MD5 3d06c2275028695352f59a6222062a71
BLAKE2b-256 464c2db3b2484f03edb2850399abb77382d4e703a24555f68e75c5285c8719e3

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09a620bba4ecab798924eee4f9831fd8e2f38fd61ebbf0f0ea6bd575e706b88c
MD5 d546f18124d0fefd52361b69e815b568
BLAKE2b-256 04ab8f28c53938bba499b96799f12f7efe3e6acffda0eb0b4726a1fbb23414c2

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