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.10.tar.gz (211.1 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.10-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.10-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.10-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.10-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.10-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.10-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.10-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.10-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.10.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.10.tar.gz
Algorithm Hash digest
SHA256 0f3ac1bd346f35a2c5df08e476cd13235d1ff095174d433d767660f13d89b8b2
MD5 51c67749aa9b229279eff63ebca0e52a
BLAKE2b-256 2cc66ab11b71987fd02e0f2701822dd1e2a080f1605120ea022ebf5b0b391294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 9fcf83cb12ad35309df25547d3699babd9b92b860e3602e7a2a835d7f083801e
MD5 4661647af7931685c8603b03add70e15
BLAKE2b-256 34913537acfe4373926a67966a10edac94a64ee051243db991ccfbc0bb4e5352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d99f83cdc8bbfd83836f1e46cbca189dcb526d640052dec3083735f1bc3bb5c0
MD5 df504a475895c207a90dd98b34910fc3
BLAKE2b-256 fcbefa9b85b4885ad650200fdc0241cfc3cdd5b2ff06db19fe66cb8792d02e95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93fec9ea26a6e14a2a120f4483e9aa3b3c5e5ac48dcdf4cdca4d71bbe7d50ef8
MD5 ca29e4c09beebd05c246ec1e095f9cac
BLAKE2b-256 34cbb641d2cac5aeedfc90d44d272b6a121044004e985a800435b9bb64091d20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a532c1cbfd90273696b12516427183aa932664f2840077ac3fbc2668875dc43
MD5 715949846e68506d63c76594410852d0
BLAKE2b-256 29f1f898aa45b2fb500b4ac15b9a9c3924596df4cfb930663cf8295510901c93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e2aeaa515735d2f7914b59b500feca4649d04bf1e01681a111aed1c98437f755
MD5 519cbd09125f7fce67a08e68e9464d15
BLAKE2b-256 cf50c9b830b5a0f23757593cb6f762be1c2bf121fa6cf65d2e351eae7917866a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 97dc9668ea055a94067c3408a077e9e5102df412b72f9fde5e8fbef1a991b345
MD5 3b4ec4e625a2b20076232defe9537761
BLAKE2b-256 ded649532a86abda517ac452aedfc3055a2e6531ce60a45782ad5806e970d8fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c477ef68fc35739b153409c03fa540b1ee5d0ebf2abd8fe951f2eaef4544dfbc
MD5 92736cdf4867277b3e89af8005967cc3
BLAKE2b-256 742f53dae5d90a951480d2034f3c6c705eb5b347e3a0c79c47df3163ad418d12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22ffefde07412553a907aef98393ccb46f4fd4db30843b62d1eed7d4edcca5e5
MD5 0f04ae3dcceadf1e92675f8f0a9515c9
BLAKE2b-256 eb0d28904a64853dc46290af488c019a8dcb08f10dc38cb66ebc07ddcfb998e8

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