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.13.tar.gz (214.3 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.13-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.13-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.13-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.13-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.13-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.13-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.13-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.13-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.13.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.13.tar.gz
Algorithm Hash digest
SHA256 db3649be546b545f879b1eabc11807f0589a86b265f4357753932f61101f41cc
MD5 9b63e07a75444a06e06e4cd1f3c7ff05
BLAKE2b-256 d5202e180a816b26f4485fdd69ba5e0b276b4d1a324bcb4475f763ef5a66a3af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fc1847b5ca5e2fcc1701f714ee844232f734790b02894cf35856046ee2c4e97d
MD5 015d62788d4af882cc4d8580f4057615
BLAKE2b-256 a8f8025068a18c04361a20165fb554c9f320d5a21e74c393de61c1f9cf0ab590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ff27d0e4af5f8f24ba2efba792cbe5cf1946665990984c06c20593c9ddf90125
MD5 159ea906e63235e6ee38b51b9382ec38
BLAKE2b-256 fc55efd324d2bace241e245e143bdc611d7216ee630aa77022541e412f8fcb00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 287e059e61a6611c0943ef6f8747188658fbe5d99688966b0f370f18047ddc96
MD5 9bf55fe501b9ab5994331dca366b8d22
BLAKE2b-256 3dff618458027c8db8795d621163d9a5828374862e9b04cd571bdaca5abf699a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0cda534b63a580891ae7f7c9c5d0fe8045e06d5554da733070ba7193950e397
MD5 746a8a3e53820da81a972ed3b8945c75
BLAKE2b-256 91ea0a9ed942e0dfcf65df9d87e3165a60abb81f1cc1f3feacdb2dfe74c0d36f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 adfabf2710d2df65f9e0a7ec38a4f0e54438f9b59fbb64611af6b512a79837ca
MD5 e29c4d27bd89a67d9d5bf523445af3e3
BLAKE2b-256 288dd8c1941f2a49769bb3b0b34e6413352927696631011c20f5b6e62c73ebd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 622619d11a17a3bd55b34227c077ae0e00df28b57481efc47278b59f472b6cdb
MD5 4a15adf3bbad6c947707e8f64cf2e0c2
BLAKE2b-256 e194fc59f6dc3d4e84a0e78bcdb97f46f5432b47d847fdc0b85701413ca413ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f7bf6133fb8ff92c9792b432362fee7ddc25629d53cd2009303115d41ee6d2b
MD5 0c9cc6920598e617582df754d96eb81f
BLAKE2b-256 46d762c98c474ce5a2b585e39227265ec5e928473558bc6064d13494cbbabe57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ca2acdfe198ffc9809d42e2b0b0267826b7f28525c7612efc9f63980a214de9
MD5 82d2761f1127602a25ec553424cd71d6
BLAKE2b-256 d68fed4735c63707e6eefe3d671038df3cc23ca8dab77edd26d44c74b494809d

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