Skip to main content

elric-core

Runtime core of the Elric framework.

elric-core is a runtime dependency of every generated Elric project. It holds the code the framework owns and keeps upgrading for you: settings, providers, middleware, route discovery, error handling, and the AI component base classes.

Code that elric new copies into your project belongs to you and is never touched by an upgrade. Anything the framework must be able to change later lives here instead.

Installation

You normally get it via the project scaffold:

uv tool install elric-cli
elric new my_app

Standalone:

uv add elric-core

Usage

# config/settings.py
from functools import lru_cache
from elric_core import ElricSettings


class Settings(ElricSettings):
    """Project settings. Add your own fields here."""


@lru_cache
def get_settings() -> Settings:
    return Settings()
# app/__init__.py
from pathlib import Path

from elric_core import create_application
from config.settings import get_settings

ROUTES_DIR = Path(__file__).resolve().parent / "routes"


def create_app():
    return create_application(get_settings(), routes_dir=ROUTES_DIR)

create_application wires the lifespan (database, Redis, LangSmith), the middleware stack, the global exception handler, and auto-discovers every module under routes_dir that exposes a module-level router.

What's inside

Module Contents
elric_core.config ElricSettings base class + settings registry
elric_core.logging structlog setup, trace-id context
elric_core.providers async SQLAlchemy engine, Redis, LangSmith
elric_core.middleware API key auth, sliding-window rate limit, request logging
elric_core.routing filesystem route auto-discovery
elric_core.exceptions exception hierarchy + uniform JSON error handler
elric_core.security API key generation, hashing, verification
elric_core.models framework SQLModel tables (ApiKey)
elric_core.ai BaseAgent, BaseChain, BaseTool

Schema ownership

elric-core never creates tables. Alembic owns the schema — run elric migrate. init_db() only verifies connectivity at startup.

License

MIT

Metadata

Release files for elric-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elric-core 0.1.0
File Size Uploaded Provenance Actions
elric_core-0.1.0.tar.gz 15.3 kB With provenance Details for elric_core-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for elric-core 0.1.0
File Interpreter ABI Platform Actions
elric_core-0.1.0-py3-none-any.whl Python 3 none any Details for elric_core-0.1.0-py3-none-any.whl

Total release size: 37.6 kB

Release files / elric_core-0.1.0.tar.gz

Download URL elric_core-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c6b93164b26b130bd006bb8300b172fca4888f43d91f5868215f24f73d79fc7e
BLAKE2b-256 checksum
How to use checksums
66676295d88aa84ff8c8b85ecf110b749f18e0c9e36d7088ffa6f4d024ff6898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release files / elric_core-0.1.0-py3-none-any.whl

Download URL elric_core-0.1.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51d0baf064cb824c14d8c0687c421463595f39e462a7a821742c46ef70a43784
BLAKE2b-256 checksum
How to use checksums
c6d4168213c8a21914ae2ae530a0f59975c1c608bee96dc23e023dc5d675fc72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Security for elric-core 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for elric_core-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page