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

File metadata

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

File hashes

Hashes for escudeiro-0.2.7.tar.gz
Algorithm Hash digest
SHA256 6f1c80986fe6b3eed4ab99ea32b0b596918bc4197467ac7703b8a3bd52b41b05
MD5 4d3cf397d6a39d8fb5b881eca3e081f8
BLAKE2b-256 a08f2fb2a71368e74546e0490349886a35a8f7ab87827e57c9530c0dd6bc6f62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eba191e1e9a233849458300d01fd98a0c85aa176ec48992f72a04f13ac0d52fd
MD5 dec5664beaaaae04c40c9508ed323d42
BLAKE2b-256 e67d99d9965e2ed01a97068d0b30c5ac1b25317188dbfff2d525f5110a962663

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4510e7390d6b6033ff93730144ef64f33c14d19fe374a687ecf72a51ebdc6690
MD5 28a06537010a302103e2ca27d7ef6df7
BLAKE2b-256 37e0a5973c1ba5303030e8dee9762ab873bea99dd65c647e7611e0e3dfbec212

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bbb2cfc2709e52e807f0adf3be06fa359f78fed3a635bcd0c7c47f06fc87446b
MD5 ec6cf70553e88c0d31cf49a437c49c87
BLAKE2b-256 dd4cc1b153e8d41bf86262973b7d19c1abfd0e4beec1153243c9d64a3c4929df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd93c4971d6b41cd3d41f663eed8429879e2829bd2256def549fd1a005813e66
MD5 5c732be564daf86f3d3d3254bc667627
BLAKE2b-256 895254518e262811f5e6bed0415cb8e2066588974f502f4bf9e8d45461470226

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 15f2dd57e15283e3d38fd39b1832be93e00ab126922fcccde9c5a5784e297764
MD5 b68f40bebd182e9bda176a0a7fe08e18
BLAKE2b-256 7b9b92dadc2a11fb3ae8919a61f2faa05f08eff4b064e94b9d446525e0d99c4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e75eb553e64e96d7fa826caa462acf10402b62be829e254a531a07d641f33c75
MD5 0600473fc8435db65f609ff76bc8b32e
BLAKE2b-256 a684ea84ca8a95aeee617aa0c4c90bc136835c1e3b51c495ea7f69070b918ee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e38ecdbb3d05a6a859fabc952e3da6e0b985eb98679d4c170c19aa747825e94e
MD5 10e5491c27b28942c9b2117e5ec2f3a1
BLAKE2b-256 813b35e3b1140ca60b2bbb49603710c0569e5fb1087ea6f4af77f40319889e7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2bfedc78171da725faa2eeeb4e47d8f172aea23cf487c6ad05290afb96a6eb8
MD5 66ea68d24435d836991edf5fae84d08f
BLAKE2b-256 ea0f3ee1ebac473b1283ae7339d458ed897eab201d86cb8e6af255fa58047d2a

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