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.12.tar.gz (213.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.12-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.12-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.12-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.12-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.12-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.12-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.12-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.12-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.12.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.12.tar.gz
Algorithm Hash digest
SHA256 23621df0655d4e78016bb5059a78b4c99f4464759d04a64802dbd9d70a3a7366
MD5 dcaf3d5772c93f1562e1d900e335c1c2
BLAKE2b-256 7229bf9a2e8c4c795d355e96896a64f714415adda4f3e8423e7cb000a4d5a43d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 746cd157abad37f737a346f9627c83683885f75ab55f4f3f68e6a1b6af825215
MD5 b00c5d97e7c3b35e1eac26f62d045136
BLAKE2b-256 ddb9e8eb71b617328147b6d3f8a965ba18e887f7eb4e3fa35a32f96738e3d468

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7ebd83e5249ed057c18a38e3de1d580e65df8bbca33230c0921dcbcb85775d52
MD5 22b362393f6175191e7e8fb833d822af
BLAKE2b-256 34f1f2c1948b90bcbf57bc5c17db32b27d0aad8f2219742377001f52111ed03f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 997885df29a4f1048d9c162e79a40d81815409ef5599c9bb0b8fb0be73cbfed3
MD5 0a34134595e4dfffdbbbc8ef06f8c8e3
BLAKE2b-256 e708740e4d5a20ea3789061f4c55f898092a79e3b5627af7909804a690dbca70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e66dfa0ef205c1cc6664f60d3cecc12adc134c951224dd376d26a656ac5a0667
MD5 9a069ede25413f1a2d23253a9890439e
BLAKE2b-256 de7737886423fd8c34c29b2208a52e5a58afb89c3b6bc2fca0c44140a17c368d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 23c91e712289beae4ca6177b2e5aed715efac765932db367bafb1c057cfc6401
MD5 4b9a114f0641c4ba3a95e4a405baaf8a
BLAKE2b-256 d6043d420eb7ec020f64fa53c78dc6a7a9af01ac89e51dc94ea16d433ae39c3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a4e39000ddffbb560d3f0ac4e8270d0ffe4bf360f981125525c49579204a105a
MD5 d63731267401830e93e8a9f1be1cbf77
BLAKE2b-256 404d46c0642e4c0aa7587de7ab0fe7614df0a6c8041121d4dd680e7536d91754

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 501e963311d5c71f509dd124a6329f375a513bb68181264149ff7197d8e7feaa
MD5 d94ffcef81a20cc3255530d99c5aace2
BLAKE2b-256 5e5c6ca42ebaaf71a2f90c2a56cb06b51486acbddf01cb96bb2223c16f00ea8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06e10ec93bace29801a9fa28f29c66d7395e0faa965437f97fa86a854b30c895
MD5 4e73d624f7dc29d564e9dcc5901917ef
BLAKE2b-256 e47f8ba4f15d986e9f74944aef8ebbca5baa47033d57fd97e7ae4fe3df6ea223

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