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.14.tar.gz (215.2 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.14-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.14-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.14-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.14-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.14-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.14-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.14-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.14-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.14.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.14.tar.gz
Algorithm Hash digest
SHA256 cbb51e408b300e7dca42fd480e5c5d64cdd351440a63095885b137ddc4143655
MD5 0d32debc6076623b821d282dbca01d5f
BLAKE2b-256 bd9b1fa8cff716b742ca8a3b37525c604d81ff58e9b388d65b8300eaee672eac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 626f79853c70d43445843305cab45088e54b85f7030da1e06522f0c0c04b5e82
MD5 4273e8e2ee4b907fd1ce3c63de115ebb
BLAKE2b-256 517ff3ff54d0f007e387f5ed4ef894f8aee4a2371593666f7ab3f404684f7126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ee75d7305ffa8e3b75ebb7e96bd9f2e91e53cc0f19e51eda6256b9efd223a2a1
MD5 35987f60aabd000083ba2a0c36966dce
BLAKE2b-256 f7a9ebc6ba727809f8183e54cf5fd972958dfe81cad94d107afb74da24678129

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 acb1b432e4ac62f4f594dde9142ef1f533f65a7a1110287be425539b8616a7ed
MD5 7e9bff1124fd212cb7349ff884a17f9d
BLAKE2b-256 c251757161287c2b54c3bca7ac77b22eca2a0f0047d8dd8b4dd7480deea341d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30d62b3227b3118bce8d6546cb44f4c16c2571034557550bd4be3a692f7ad398
MD5 d35dfb000747e3960dd689a6877d730f
BLAKE2b-256 3bd32c680e2bb9f4a4bf7d0e340f76aee919e835f7650bfd2a9803727969dee0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8ddbe4ede8fee442c0b1bfce21eae803d8b31115682b2ab019d754feacd14ad6
MD5 2546cf31c0dc72d7a22bd614e2346c13
BLAKE2b-256 99a2f57449c0c1e2ecddf3994dc692eba52ce2b5759e8396689950b74bf45700

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0466e7890f03d78d9f14970f75bc70684c4b270c7d2c893e5559fd2f21a5a8d3
MD5 3eecf2d68e0acb94c3ec7ecb01459b8e
BLAKE2b-256 76cf6bfcc84e831580f2abfc123119103fffe77340639968e759273d4f88d9fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9a3a4a1c3c2162f65db657987de2c8a5d8bc0fbaf514b650905465852a4ef15b
MD5 fbcabe9dfc375c8ed26741093623f527
BLAKE2b-256 95a0c8fd7b364f07aaa64ffd6f73f729a6a73248ebf92267dc88a20b8e8a11aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2f14ca80fea2a73cd4b33411995654bd466809926b6da1a09ee8817d935c968
MD5 ab755c7d654da0d4a78f53d149ca8f61
BLAKE2b-256 f712c2dcdf7038637710f963b091789c0f8441727daaf9f95b03859ec12a7879

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