Skip to main content

Forschungszentrum Juelich Logo

datadesclib 📊

A lightweight Python library to attach metadata to classes and functions using decorators and extract them into structured JSON/dictionary formats.

Features

  • Zero Dependencies: Uses only Python standard library (inspect, json, etc.).
  • Type Hint Support: Automatically detects type annotations.
  • Docstring Fallback: Uses docstrings as descriptions if no explicit metadata is provided.
  • Flexible: Works with classes, methods, and global functions.

Installation

pip install datadesclib

Quick Start

1. Annotate your code

Use the @meta decorator to attach any custom information to your classes or functions.

from datadesclib import meta

@meta(author="Lukas", version="1.0", tags=["internal", "database"])
class UserData:
    name: str
    age: int = 25

    @meta(description="Saves the user to the DB")
    def save(self):
        pass

2. Extract Metadata

You can extract information from a single object or parse an entire Python file.

Extract from object:

from datadesclib import extract

info = extract(UserData)
print(info)

Parse a whole file to JSON:

from datadesclib import parser

json_data = parser("my_script.py")
print(json_data)

License

CC0 1.0 Universal (Public Domain)

Copyright (c) 2026 FZJ-ICE-2

Developers: Celine Körner, Patrick Kuckertz, Johannes Jamroszczyk, Titan Hartono, Jann Weinand

About Us

Institut ICE-2

We are the Institute of Climate and Energy Systems (ICE) - Jülich Systems Analysis belonging to the Forschungszentrum Jülich. Our interdisciplinary department's research is focusing on energy-related process and systems analyses. Data searches and system simulations are used to determine energy and mass balances, as well as to evaluate performance, emissions and costs of energy systems. The results are used for performing comparative assessment studies between the various systems. Our current priorities include the development of energy strategies, in accordance with the German Federal Government’s greenhouse gas reduction targets, by designing new infrastructures for sustainable and secure energy supply chains and by conducting cost analysis studies for integrating new technologies into future energy market frameworks.

Acknowledgements

The authors would like to thank the German Federal Government, the German State Governments, and the Joint Science Conference (GWK) for their funding and support as part of the NFDI4Ing consortium. Funded by the German Research Foundation (DFG) - project number: 442146713.

This work was also supported by the Helmholtz Association under the program "Energy System Design".

BMWK Logo

Metadata

Release files for datadesclib 0.1.1

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

Source distribution (sdist)

Source distribution for datadesclib 0.1.1
File Size Uploaded Provenance Actions
datadesclib-0.1.1.tar.gz 7.9 kB Without provenance Details for datadesclib-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datadesclib 0.1.1
File Interpreter ABI Platform Actions
datadesclib-0.1.1-py3-none-any.whl Python 3 none any Details for datadesclib-0.1.1-py3-none-any.whl

Total release size: 16.3 kB

Release files / datadesclib-0.1.1.tar.gz

Download URL datadesclib-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
35e32671655ae521d4e8d7aaa25a0abef451b5ad5cf4d6ca2d91d1b1b71588ce
BLAKE2b-256 checksum
How to use checksums
8048b60812ec1e174ef760967bfc1dfcaa9f8570fc0e40879a1fd1635039a442
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / datadesclib-0.1.1-py3-none-any.whl

Download URL datadesclib-0.1.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6788822ac687f932c2afa6faf34ade35216e04a474275fe9c003bf0087d04aa
BLAKE2b-256 checksum
How to use checksums
0a0488cae9dbc3247e294c923fc9bb55deae92fc961a011fc0e3f1b3cf36e6ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for datadesclib 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.1 This release

2 release files No 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