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.17.tar.gz (237.6 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.17-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.1+ x86-64

escudeiro-0.2.17-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.17-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.17-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.17-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

escudeiro-0.2.17-cp312-cp312-musllinux_1_1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

escudeiro-0.2.17-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.17-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.17-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.17.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.17.tar.gz
Algorithm Hash digest
SHA256 a3398ec9bb09f8182f99752a12ec3f2fc69ccc5b27c5a0823203f750eb46ed6c
MD5 6455ecadd838a07c999cd27e8ad10bb6
BLAKE2b-256 c280bfad35b173f464c76296b3e379e9fdfa617247a042f212d7dc767e3c963c

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.17-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0f3ab905187fac804e2dcc2028336b50b6a42ed54349bc1222d1f81c51b933d4
MD5 064da3ae12a1edbec9f97c7ab93de69f
BLAKE2b-256 633c0d21c32e162bfbf6a2eb3c009e500fd38480b23a941d3036f364e848af75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b5ac4a25258776f1e4f9635786b96ddf739a6d53b21411f063634cbfd5ca0a2d
MD5 fe6c1510c585db29c92076e56aefada9
BLAKE2b-256 7372e0528300046062f973ef83cb97b04b3bb0b38c5e17ceaf664f791544fb57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 29617433c6eb2b1928e2c1abe40d5127bb0b63de20ed8dc0414dbbc8219aedd5
MD5 f5764a12f8f2abb8cd4fc1f81ab4b496
BLAKE2b-256 a58fccf53decd7b88d0bfbaed57098e876adf280a613ac4de67b100c58c243d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f90315d70e142a3121f922de2a572d51f3a03dc7c9675e4eecb8a96c34139925
MD5 1b63aeab1bc11ab2e66c4fb357b71aa8
BLAKE2b-256 54edba12efcdea64cd24c51cbe607cb98d6e392025591f5d89775251c29baa31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ec21e319d606b46d0bf37fdc0d8e325fb039b8710b009ad930d5ca483df4c77
MD5 195ec26ac0cf888d3897735ffa480500
BLAKE2b-256 0fe547a9455eb8c3e2f555b3548bc3abefe2809ad8caddb61a6725bdd84e16a5

See more details on using hashes here.

File details

Details for the file escudeiro-0.2.17-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 70f23ccd52d1cb95b7b6578cea4ac26cde045fc98408092e6b630d91891a1c42
MD5 8f8349a4ca515609e59cd7f4bd492331
BLAKE2b-256 339ebbaa3f44113b0ff40867e59a5b26b11f08fa9144d3f5bc85c7584d50a90e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 367817d609781ffaaf3c8adeba483dd7590c590cad652ad31769466e4b5c1368
MD5 fc7d6291370780852287d76c47abb522
BLAKE2b-256 2b9b333b49f0356ced03fe4ac78085851da1610cdbc2db6fb745cc9ae9f5f47e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bcbbe146da5b9d3ab4acb29a84858e0366a239c98ff1ac6487c4a41c7be524c7
MD5 53ca7fb8dc96abb326a1238a2f1c0c47
BLAKE2b-256 ef43b9ba1a7803e3995f086956b491854ac285665a60060df4a2632342700c87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f4e29a5bf78ffe506646c7071c02117260b92e28303a0ef334c490acea0fd2c
MD5 4537961175c97f0584ec1f3a07952392
BLAKE2b-256 b1e3f39d9b1f92c471d931cf3d7c269182276284d3634149b3e8ddb0ad4405ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c068f5066d7d350876a8a39b7f9aada7d35529f28067a93c38ce707a87264f2
MD5 3bae1ce3b1d52cf53b33bb38a02e22e4
BLAKE2b-256 8d9cbab953d280c5ab6710b98079b3c80d80dd5e625ca3237ebc7f0baf7ebbc2

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