Skip to main content

Extended Language Support for Python

Project description

LangEx

Extended Language Support for Python

Installation

pip install langex

About

LangEx is an experimental Python library that introduces additional language-level constructs using decorators, metadata inspection, and structural validation. It focuses on enabling capabilities that Python does not strictly enforce by default, such as interface-like behavior and structured object metadata.

The project builds small language utilities that operate on Python objects (functions, classes, and other callables) to inspect, validate, and extend their behavior while remaining fully compatible with standard Python.

Features

  • Interface-like constructs for Python classes
  • Metadata extraction for Python objects and callables
  • Runtime validation utilities
  • Decorator-based language extensions
  • Lightweight core inspection tools

Example

Defining an Interface

from langex.interface import interface

@interface
class Repository:
  def save(self, data): ...
  def get(self, id): ...

Implementing the Interface

from langex.interface import implements

@implements(Repository)
class UserRepository:
  def save(self, data):
    ...

  def get(self, id):
    ...

If required methods are missing, validation will raise an error.

Project Structure

langex
├── __init__.py
├── __main__.py
├── immediate.py
├── interface.py
├── core
│   ├── __init__.py
│   ├── callable_meta.py
│   ├── class_meta.py
│   ├── meta.py
│   ├── object_meta.py
│   └── use.py

The core module provides internal abstractions for inspecting Python objects and extracting structured metadata used by higher-level utilities like interfaces and validations.

Design Philosophy

LangEx is designed around a few principles:

  • Pure Python implementation
  • Minimal runtime overhead
  • Explicit developer intent
  • Small composable language utilities

Rather than acting as a framework, LangEx provides foundational language tools that can be used to build higher-level abstractions.

Status

Experimental and under active development. APIs and structure may evolve as the project grows.

Links

Made with <3 by AttAditya

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

langex-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

langex-0.1.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file langex-0.1.3.tar.gz.

File metadata

  • Download URL: langex-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for langex-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c4a0736f5a2c6b12b55b31da372a3a9e10430fa90924a947170765dd1a862804
MD5 3b68e0d8f66f64e7046708fbc58ee266
BLAKE2b-256 2eeb1e3ccd9d3a90f9fd58038649c2937f867fb48570c1dfbf182cbb7440dd0e

See more details on using hashes here.

File details

Details for the file langex-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: langex-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for langex-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41414d17bf46c6d3afb2ceeb6e0b1948ff59fa6a94238d16eda1ef43d99e480c
MD5 2ab4661d0a2f7ea1fe0cf659aa2d8f49
BLAKE2b-256 05afe7929b60d3b8b93eb0bfeff98a970f92162277c2b0698fdd9ed2ff517b22

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