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()

Phylosophy

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.4.tar.gz (165.8 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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.4.tar.gz
Algorithm Hash digest
SHA256 6aa5a11edf2edeed8f38e3bd82f4f5f0c1671f6ef6aa68ccb3436f51d00d1426
MD5 abb1f3972830a3610418bcbddb5bf4d7
BLAKE2b-256 2a40af478a2afaf38b248df2d7b5becedef4fca5299ea6c13e0613a6ac86c4e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 061cc1ea4723d00111a9aa9d05450eea87c9b4257f1ff6300da92d44df148936
MD5 d5ee153c605238ac74f435dc3c458a9c
BLAKE2b-256 e2c52b995dc2f32ca58988bbc158d865df09cf69baadc4ca472f0d1c760e3216

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4e65875db545be690e81a1aea175b952464b1178bf858f1506b20820e93132ec
MD5 0da3a6120c094d7486c376051d9c4985
BLAKE2b-256 adf9ec75bb009c76dc2d56941e40b614180f870c302433704b67c999433704fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8374bcb40ce2471015801b2082cc4afed1e1052e0de49324ad04e5cad4400276
MD5 98895badc1d00581b33f29a8658e8e53
BLAKE2b-256 979b82c70128a7cec6b2433fcc1de788da25526c310bdb77ab8ca4138702cc36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c09ce2723d51ac86793dd22f33a2a7c3d5af44af773394f19494b2837659aee1
MD5 b34c0c84c7cbf971f7a43942f6db1225
BLAKE2b-256 f878ae0b0b7bc5697087c66aa9606f6bac42a44a0c3acf453691a1dd89fd020c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 88a9a4bdbdcc3657adcc8a458cfbddaec402755239ef97d97b16d9c766baf1e0
MD5 499def9001598cfc6c5b5249ff03d592
BLAKE2b-256 4e3d3623e234a195351604fde31ef9ada1b84d6f852e1db9c49f06e6a917d5f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00758998a5cbc646b1c90197338d58599b8e35ea67b18b393d0b1e80e88ccd74
MD5 b7e66d79871f56e81199d17c89620bb9
BLAKE2b-256 868951f866e890ad3141248f06c0827c70ae11f44c5615a0f285728900915fa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08ac675b8a8d4d522f584956604e923e2277ed91de99121ebf13074f60750f81
MD5 e879e968f51604f16ad05c0bda8bdd94
BLAKE2b-256 696048c366162f2452867c1c099831c34b5902997b9b0bbecb01a0280d7b4fa7

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