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.9.tar.gz (201.3 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.9-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.9-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.9-cp313-cp313-manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

escudeiro-0.2.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

escudeiro-0.2.9-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.9-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.9-cp312-cp312-manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

escudeiro-0.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

File details

Details for the file escudeiro-0.2.9.tar.gz.

File metadata

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

File hashes

Hashes for escudeiro-0.2.9.tar.gz
Algorithm Hash digest
SHA256 b934fb033ca9737f32bf0d7ae0cc30cdab338f0efd45d72e24b8b67a69e83adc
MD5 e36c56e3106e9d1f018f8da2c371fb03
BLAKE2b-256 af083a2904ec67d3f7a7b5dd69e0b0877a3fb60aea291ed9bd729cd2be484a43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3ef8eb7cef7c278624ef27e20af6a91335fc0f319f8240bf219b14119bd9df03
MD5 64662f69dfeb292c0f17d2c329224708
BLAKE2b-256 ef46f091581a5b86dd608514f5526279a47d20045b534391941eca068de88e71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7dfa7aac1830b1c1ed3c40afd73420fb4b84c608a1110d79de7b148623dbb4d2
MD5 ae9a94cf5be9dfc691005ce71797b6f9
BLAKE2b-256 714748fb551a935a9f37b46708b5fbb8723a9719ef75b7792cb01ab1ab96391b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 43a10dcbddc8dc5059dee732e9b98ed8a7ef5b7ca6b87812f2c1e6099e71aabb
MD5 319c74472e6717c54cc351721403deaf
BLAKE2b-256 46942fc440004a9d32f08336dd586004855d2ed401459e6c207b0d2677720aa6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad10171298923821181d1d3f620d9749deddb1a22c407235d23f32835b8e7233
MD5 d2efa35bfe7d9e4240ca29a2b4e2cbe5
BLAKE2b-256 2567e9bdd8a20f9510a489290c2ab1f0108812197f7242906bfc510ac14d3cb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 87f8fee9b2ae08c887c27524d50cbd3f8940497b682c411a4bbe491d480c8e4e
MD5 bdfb924caddd3ca1a6340bd13d9bc5e0
BLAKE2b-256 d77d38ed9c4b05d425f8b1ea8026cd9790d7124977b5b02aa92307de966607b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 66af8332e53db3c777ae57f1b3e1313bb9d92fd3a3700aa6c982cecc8d278fab
MD5 4d69215acc69d9cea17192174c7c94f9
BLAKE2b-256 7599daec277e09a3adc37c0c6143d27f6c2ecdc78eeaee458e91e5c53d1d63bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e05cc063329cea3a4c5cf9ca27089782aba234943573a7088a2d2c518d58485
MD5 ddc02dc1f958225072a1c0045b6f0a13
BLAKE2b-256 09d629b5cdda52b19d066eb03f6fdd8c1a2eddeaa5719bc235b41977f4a5204e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escudeiro-0.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f674215d42618ddb6972a00912ae2f0a0f20e59f7140186a2b4853d19a96d057
MD5 5c5600dc143a7044f5267d759a406888
BLAKE2b-256 9e2e246a9c070d589fe0c6002b11f5f60e6c5ced5f44d68fbd075b74ad79dc7d

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