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.5.tar.gz (195.5 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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.5.tar.gz
Algorithm Hash digest
SHA256 2d03726159ea13d8185430e1218883cea69ab34b48204f20e467dd32bbd9169c
MD5 79f100509a65d43865ee8d6ffa0f2315
BLAKE2b-256 e8de34b6a6713c22901d77a70d6b9cc45098ad86fe7fe8c409c86834d01cba9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5387aa297baf7cb366f75250161bbd0907bfffa1ba22f5aa943826bd99309c85
MD5 9ef982b38140d650fa6643457248c584
BLAKE2b-256 c08b020a8eb2060025e794c784b58e4f793ed482408a3c5de3268d87581fa1be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 008df7f3c54f9c3046e4758f0017670f9b673491569c7325d2b0d6fd7fa48e53
MD5 ce1bb4de7ef28425a81afced4c5905fd
BLAKE2b-256 82dc7a01d11f9430d8c6a338a9f15b2dfb4360185ffd46b666c5730688fd3207

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72473c6a5dd32c72f910de7feaa0378c0e949d7749916a1cfe9f4d1dd697e309
MD5 209b9a599df3eb73768a79ccdc1d8214
BLAKE2b-256 d90ee39c58b5a06926504e168d4eb12bf3e947f0ca7ee7f412840639b945ec60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4bc0b7ce36a8a6f53960f235d5deeed09590eed2d041eec8f7bc1dabb2553632
MD5 b789cb7c24dd7e3fe6170b7bab1d26c9
BLAKE2b-256 689a3d244b3139ccefe8b7554738a475760cdb58a762844bee5c4e03b1ca52a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2f44ee6e1c5aa93c2bdecd0bc89cf4ac1820c542406d45f3da8f9856d38e6316
MD5 6f924ec4afdc15a1161b99a4768955e4
BLAKE2b-256 88c74e63a4755f3ef29dba437400d8900403da2b3d7ad1f42f9b846890e66e66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d90aa55547ba6c33e02972ac4a88eec1972466b1059bd83cbc2229e632a48afa
MD5 2fb106bc526a01d6ca4a86f69f2f2ec9
BLAKE2b-256 592c5df347e7f613bd5bb7c848c44da07e04b30b3859378689812614d62d0cfa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 afa4fc9e3df8cec6a055e5528116f9c38ae0483dfcb59a94d5bce34fb96277b5
MD5 a6eeffbed1a91cbf51e26ea812cf8208
BLAKE2b-256 e50ffac87241e4627eb7bbd00dc15169c25243fdea31c89323b6b4feea91502b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e2e33484ad5f261fa1622c7911df4afc75f9cd37952c5fb47fcdcd7500d3f90
MD5 e6670191433b78e0dac8b64596997670
BLAKE2b-256 0a4a5cab6fb8769d91a5a184a9608c540b35115955a3f20484e764455842aae5

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