Skip to main content

Add your description here

Project description

Erech 🗿

“The Dead awaken; for the hour is come for the oathbreakers: at the Stone of Erech they shall stand again and hear there a horn in the hills ringing.”
Malbeth the Seer

Erech is a declarative, expressive assertion library for Python, inspired by the style of Chai.js and forged in the spirit of Middle-earth.

Named after the Stone of Erech, the ancient Númenórean relic upon which oaths were sworn and long-awaited reckoning was called, this library is built for readability and expressiveness, helping you write tests that read like plain English — with the flowing elegance of Elvish. No more tests written in plain python, with repetetive cryptic dictionary references in the tongue of Mordor (which we will not utter here). Just as Isildur once bound oathbreakers at the Stone of Erech with a curse that echoed through the ages, your tests are bound to declare their intent — and to stand accountable.

Features

  • ✅ Chainable, readable assertions like should, have, that, match, and more.
  • 🔁 Multiple assertions on a single object, in a single expect().should[...] expression.
  • 🧙 Structured and semantic – makes your tests easier to understand and reason about.
  • 📏 Built-in matchers for common types like uuid, email, etc.

Example

from erech import expect, have
from uuid import uuid4

expect({
    "gameId": str(uuid4()),
    "userId": str(uuid4()),
    "c": 3
}).should[
    have("gameId").that.matches.uuid,
    have("userId").that.matches.uuid,
]

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

erech-0.0.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erech-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file erech-0.0.3.tar.gz.

File metadata

  • Download URL: erech-0.0.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for erech-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fd310e916e39883d7789e12e824b48c0c8a2952a6c4a1ee3a3b007c87eae6fec
MD5 357ae84707f01802f7549f0c9ff9c7e7
BLAKE2b-256 841ed2e3fba357269486c7a0d18e37e65b563befdb60ba006abb072bdc5d7d72

See more details on using hashes here.

File details

Details for the file erech-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: erech-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for erech-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3cfe546452dba62e1885bda3c4ead931a7724378c9b3a118bb14fec4dea26b7f
MD5 125b08f2a08f4cb4063f7bd74bd7961c
BLAKE2b-256 b8c4edc0479f6b8bfada679d48ea9d6714671e7a6f0dafe82d49f9d7bf7ba6e2

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