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.6.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.6-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.6-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.6-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.6-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.6-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.6-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.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: escudeiro-0.2.6.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.6.tar.gz
Algorithm Hash digest
SHA256 3c250c7b8f53233c5f391e88d98f9672d311b358b81b2c4f9f221692d6739243
MD5 660aadd87a798f07047fe5a846d98065
BLAKE2b-256 dab6e6ea57fed34f42dace38a56feae477374ffa3199bb92f26bbcdd39ccb0b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 84d05243a7fc7d96598b563bc91823dd2ed0826dd2f39a98ce1ee87f0a9eeda5
MD5 3485385fa284cb97f189e736290b0737
BLAKE2b-256 6ac70b62071721787a3f1649b2522867cc265d1fa7f556cdc88c1cdf9d50222f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 af76ef2c413a619dda3730a41fc47a22039d331956264dcb99b8b0bc9837d9d7
MD5 2c5dd673c2d60ae853c040af014eeb05
BLAKE2b-256 1f6eea2e245417efab17eb0d4e60d24321b4e7614125bd9c0b24153cf16bdac5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cced7ea23d7da068ec417cbbe70850b77192b8fe631002157b1791c63a3c5b14
MD5 4fd1593cf3d0b8d15dd19b98e4e768d3
BLAKE2b-256 1cb1d58f690e932614ee6e2927b9c0ee30f19a0201f828bdb1c9cd6cc2f25c1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fef66fafb5df8fdbc863407e42654ef77721be658d08796dab84dc14cf3fd10
MD5 48975dd6c9003c20081d7de7e21ad30d
BLAKE2b-256 b591075f4f27c6584b418850e0116de1e914e91adfc54ecd70dd5afd4e8d3725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 541e6be1416db620d1d3a9ed1c3e3dbb437d522813f4900d7c5b22168090854e
MD5 066bd0c846584d50aa94360e86b026bd
BLAKE2b-256 b07878637a10491e8d0c565695701c0f1ae44724fc3942c804d400a96079724c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d1efd77c31ffa7d7585cefa3c49cfad2db68dd447ac6603c89d36128e271fc73
MD5 2af29c1ba03f86c3de0eaa58e6b1e159
BLAKE2b-256 787914359171fc02911d3496254e55804256516bfb5387eb5e001fea6adda55f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c36565ccda6d52599bcba1823951d9f422d10a252ad0a8f8cebe76001fbd249c
MD5 c1bcd6f1a2d8aa369c91096810ae918d
BLAKE2b-256 ed889c494b39cb296b1c3ee20c4cb947ebad3464029fea8e9d86ba5009aa390c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0d2c72dfa8f37cdc1a78ee4b9ddd082860e57548b7dc1deddf61b773787458e3
MD5 5f543493470f8c5e1df5a0dd01ba4a7a
BLAKE2b-256 710f959347c1ecf61edbfa264d333fbcde2df6aad963b1a77010d0f2f91423c4

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