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.3.0.tar.gz (238.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.3.0-cp314-cp314-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14musllinux: musl 1.1+ x86-64

escudeiro-0.3.0-cp314-cp314-manylinux_2_34_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

escudeiro-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

escudeiro-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

escudeiro-0.3.0-cp313-cp313-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.1+ x86-64

escudeiro-0.3.0-cp313-cp313-manylinux_2_34_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

escudeiro-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

escudeiro-0.3.0-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.3.0-cp312-cp312-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

escudeiro-0.3.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

escudeiro-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

escudeiro-0.3.0-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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c1f1ad79a03c4e14ff3b5c45398c6a3cd4bd9869e94002dab3e6a78f3fb2303d
MD5 d4b37d52c4cfec6c6906be6ccd871ead
BLAKE2b-256 2ba134ac4d418f88d9fba731052dfdb73e3e28f20cd9d56e7ef0306c41e3c431

See more details on using hashes here.

File details

Details for the file escudeiro-0.3.0-cp314-cp314-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp314-cp314-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 56bb933c60dbf29912bafc9d0ba95126c2d0d8f60d24151a7c11c8d3509409ae
MD5 1cefc891f568f37b80b40b6c75a7922f
BLAKE2b-256 fd83cdf547febddc891de7f79d337c72b80ac8f56f7673880f8ae9f26020015e

See more details on using hashes here.

File details

Details for the file escudeiro-0.3.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 61d39f0ccd83da89c3c7a0710f019305f7c5d3ae2c5148e5e131de986a6efa42
MD5 902f3002939fa6b738135c25129423dc
BLAKE2b-256 5b293d986e707972350cd4fbb6ca0fab444bbe45c9d7edcdf844f3dbcef1e523

See more details on using hashes here.

File details

Details for the file escudeiro-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a31e138347dcba40b3a8135da92f5c9ac13ab4d54e61ecb98c5ee05fee8679ea
MD5 fb4b0899ea76f333288d00ed3d435095
BLAKE2b-256 c85d34443b8d2392e3d779dcab99136e984b4dc61859d064b9fc9db0a751f5a7

See more details on using hashes here.

File details

Details for the file escudeiro-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e603c22590deebcaf5bed9f07740f2f8182d1319efb89206d6ab4563dd01eebf
MD5 a91e88ff5fe284c4eef5a30202055723
BLAKE2b-256 75088b6bfcc5bd03600bf557fdaa6c308a2cdbc97cfaa70cf735805842861b81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 01411e4b327579d6045d5679ea465940f903486c27eccd57abb1bd20a4ebb800
MD5 92f66442330336ea8e3973bb608d44b6
BLAKE2b-256 c31c6da3cc9b8b9e499a71f7bfb0023f6bb9391f852b215ede5f3bc6ba92c3e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1af81bde2abc35a87a66a9d627f7d33af9947acc3bc4806647ab2050044e0792
MD5 c6355bd470c3050e9269a30706746ab6
BLAKE2b-256 18ab2ce0f9be00b26b0e020ee7fb55dae45653e3a58627bfb2d6dae0e9d6375f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 31621b41a976f010dbd7ca84e8446906bd3b74e6cd332d716621ff61a1e07a1e
MD5 515de50c3cc99af54a48ba03805526d7
BLAKE2b-256 163fa92afef5f2cfbcd498d37b67d47c941a4b72cba67b69c983b0b29e7a9bbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 374a792a3e7f9ce42de502f6ade892e63f1ad3d0e683aad41b5ab85e61ad29d4
MD5 bc03fe98485e8a051746df31da97b6b1
BLAKE2b-256 d56792fcf19a9d99855a09fc8e01dd096f0a6d5fa209db9bc068414421b7ab16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 374cebda727c1ae1d8782295358542d3cf60916c5681be603569d9eea458d3e7
MD5 6f340deaab78c0ad92b63dc5c8640869
BLAKE2b-256 5af2caa5d69c373f049dd8a190700cf801e1211883ab7db0e9effb95909a57d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 acecb60c9131a00bc8586adf4d83baf85cb75584d00a32ffc1892b9fdb5a7d05
MD5 3f88618c3598df0dfcf41f23d0077e0d
BLAKE2b-256 a59948d87c864ccc6d5dd21ed1bc42d20ff36ff769695ab1ec8db2e81aab844b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2c217ceda8fe0a789a9071eb1d838ff6124e4758607f798c738cba76ca71c5c
MD5 bf6a3b271f965bcaacdb488e62fae15d
BLAKE2b-256 8b36c784c620df3c9a382dbe84b775d99b0b56cc02c0a30cee17dfa9915c0917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea11711512c727f33e45f35981e7e2d5aa02a1214573455872ba43e31a05e2b2
MD5 eba75a81849b1cb846ca1636c7e6bf5c
BLAKE2b-256 a2d50285fd643ff25945bf389bec23f70759dafc343c0f59cc9396bd52ec5c6f

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