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.16.tar.gz (236.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.16-cp313-cp313-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.1+ x86-64

escudeiro-0.2.16-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.16-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.16-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.16-cp312-cp312-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

escudeiro-0.2.16-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.16-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.16-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.16.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.16.tar.gz
Algorithm Hash digest
SHA256 02d06b291b24a7979d61db3c992ec15be2bbbfad8c143aaa3a64919d2e446050
MD5 216b89a276a11e5255ec0d180f04f366
BLAKE2b-256 022ddb69e2e2945316a94fbaa9cafc4d8eefb558ad025f1ce0671dce94325b41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 075ebd1174031f063790a95fea4a92c4ee49e3b1f8ca8fb27886d0cffd9d5d3d
MD5 c7211062b117bbef06eda0bbbe52a823
BLAKE2b-256 57118f5d3b86b2f9b13c2df28f4bf754a2fcfc5fffb3f3df4a6f9b41066c727e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 24faaf6bfd61eee8d4b766eaf486ca02d513982b386d709f0ec90eecd7e66bf0
MD5 0872a9a7437391abc70b49e9efbd62b3
BLAKE2b-256 817de65e9e6f8fa50e7776719eb7d2a042b15d417435af0c4410c9011771a723

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2fd0a72bc3612ef770f44c7c6557c5956fee40f53b29a604d660dfb620459196
MD5 c648094c8ac1a7f06ace81ac559396b4
BLAKE2b-256 7940750cd079e2c621e153e68a8d43b68407a81e6e1bd36cb55566b0a93d1a1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5673e661995ee483466a0e184101833d302fceff61bd88a3e0ea7512fafd6033
MD5 1cddef3e78aaaeff4c4637ebbb8a56a7
BLAKE2b-256 c2adf5ad3fdc014c7beb54875a5eccf23f865e156c9535bce66fc04b0f3d2fb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a3cc7fc6d47e89a8771c6eb92bd7375c23add40cc10393aa6df0b59ffeb06824
MD5 a0523fa256040a50b4d6ca3c85b95d3c
BLAKE2b-256 7cd63310132cbb01d34a55e59eb69475c5c8fdf32fb671280af25bcc75af2f8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c739cd4a6d3f83a4f21d64107dce5e452b7c765ecfaa97c419122797ac93e848
MD5 bd05fae3dcf0c10c5902267326206933
BLAKE2b-256 2a3f2ebc5ce545d48fd63375833f5cb6671a27a52e20109e9e94c2217d586d10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98dd5947964ac899cbbd0d9f42092d1046c420ceeca4a9b774bfa58fb704da36
MD5 5a9518aa57edd1ea4a5e2b5217420b40
BLAKE2b-256 70eaae06ad9e684e52d3aefda1d74a3138233445814a8417403264383e318775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20bbcfd9ec2c9abe8b1002594a60c68cd8b58675124fdd03326f236598c8711d
MD5 7f0b3d9206d1ea855110bfc1282bd6ed
BLAKE2b-256 f94db7f5bf92fcc7c70f6a21716d22fa9c39b539b7e6cf0c7abc985170595a0d

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