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.15.tar.gz (215.0 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.15-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.15-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.15-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.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

escudeiro-0.2.15-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.15-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.15-cp312-cp312-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

escudeiro-0.2.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for escudeiro-0.2.15.tar.gz
Algorithm Hash digest
SHA256 014947fb25b66df9aa0955931660b1f2a9d0781ded7e152ebc3a471b5421a030
MD5 aa15afa4435c9381e87c2ff3e20d0529
BLAKE2b-256 4d39c32955055bfd566f175aa509dae8ad0d3ab5c3673de4ab28983ed1dba911

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e408e1852857b5b0fb100af3fa91dae984331844120e0d5c1b5c848e389bda98
MD5 b9fac6cbd17a37834552884a761fffde
BLAKE2b-256 9f0372726b09760b900077e6ccb77bb1a71e409fabaedf97eaca8d15fa2196a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0dd72442ef9b84a54130c4b79c6ee623d14d47d1cc2a001eb3858e28824a6057
MD5 f8c1a721049a3601a0642f29788b8661
BLAKE2b-256 92089ea0d06130bae9f8d9ee7568d1fa009479844c89e7a2552cbdc90c38a916

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b891a3c6284d118d8bc27e4f4b87f1e26e18ad0400267bc9db2286c5d76ff8be
MD5 5aa16d0d67689e162fa3a65eb752b4c8
BLAKE2b-256 f090842d1960652feb595eb94334f0631a31ea6b2d99b1af680417e9f5b2ed3b

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 841ec5205397598198bd1cd30a22a3a485290d5243875bfaaf44cf6beac964ef
MD5 484c8c1ec3d03f3e20aa672ee2c4f096
BLAKE2b-256 55242db02909a70e00a1fc26eea2cfa9cd99d681ae0a2316d0769eeb13c7dde4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 207400942f532cd2d56a96fe3e1f60bd23e6669a9260c225d11aa30c6c673256
MD5 41168c46c641b7b3f1904bc80087b570
BLAKE2b-256 1c7f2872accbe959fb8af5ef72c2687e0394f167623839e5475ca68f7057fd3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 59529ed4b3ffbec258a12e800175b4b5c0693ad663df8a1dd8b12d8473d5b47b
MD5 454bf2aeb7c0ba17f0d451a437aa75c8
BLAKE2b-256 6971f541a334596a90f03e55ff598af3b7d4d134a4f6173f9a089ed8f7f975f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76ad44aecd99d29337b4c6df67e12bd2d39ecb795d0f699ac97d829af6ecced0
MD5 c3bd8697cbb6be37d88f094b38e95b52
BLAKE2b-256 efe6b0677fbc3428f01ed5294095997683313dbc2895ab549da473f5658c313e

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e87482a2042eb07a0c9d8c9ad8ea5ac0fb66e010bcd235c33c31e357851a11e
MD5 3af4105b8d052b2bacb3de93ecca2c5c
BLAKE2b-256 90df988670b251b64f961f36af8b90aea6824185bb27f842b3df25209b24832e

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