Skip to main content

Reflective provides a plethora of ways to access and manipulate structured data.

Project description

Reflective

Reflective provides a plethora of ways to access and manipulate structured data.

Notice! This project is in early-stage development so the API may change aggressively, and some features are not currently present.

Branch Status

Branch CodeQL Build
dev CodeQL Build
0.2.0 CodeQL Build
0.2.1 CodeQL Build

Table of Contents

TL;DR

With Reflective, you can access and update composite data structures in many ways:

from reflective import Reflective

data = {
    "app": {
        "name": "Appy McAppface",
        "description": "The $r{/app/name} app is a great!",
        "version": "1.2.3",
        "tags": ["production", "release", "v$r{/app/version}"],
    }
}

r = Reflective(data)

print(r.app.name)  # Appy McAppface
print(r.app['description'])  # The Appy McAppface app is a great!
print(r.app('version'))  # 1.2.3
print(r.app.tags)  # ['production', 'release', 'v1.2.3']
print(r.app.tags().raw)  # ['production', 'release', 'v$r{/app/version}']
print(r.app.tags[2])  # v1.2.3
print(r.app.tags[2]().raw)  # v$r{/app/version}

For a much better explanation of all the features you see here, please see the Feature Documentation.

Installation

Notice! This requires Python 3.8+

To install the Python package, run the following command in your Python environment:

python3 -m pip install reflective

The PyPi package is automatically built and published to the PyPi repository for each release. If you want to install a release from the source, run the following commands in your terminal:

python3 -m pip install --upgrade git+
git clone https://github.com/AzorianSolutions/reflective.git
cd reflective
git checkout tags/v<release-version> -b release/<release-version>
python3 -m pip install .

Project Documentation

Project Information

For information about the project such as feature planning, the roadmap, and milestones, then please see the Project Information section of the wiki.

Contributing

If you're interested in participating in the project design discussions, or you want to actively submit work to the project then you should check out the Contribution Guide!

Configuration

For information about all the ways this library can be configured and what each setting does, please visit the Configuration Guide section of the wiki.

Library Development

For information about how the library is designed and actually works, please visit the Development Guide section of the wiki.

Library Testing

For information on how to create and execute automated library tests, please visit the Testing Guide section of the wiki.

Security Policy

Please see our Security Policy.

Support Policy

Please see our Support Policy.

Looking to chat with someone? Join our Discord Server.

Code of Conduct

Please see our Code of Conduct.

License

This project is released under the MIT license. For additional information, see the full license.

Donate

Like my work?

Buy Me A Coffee

Want to sponsor me? Please visit my organization's sponsorship page.

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

reflective-0.2.1.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

reflective-0.2.1-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file reflective-0.2.1.tar.gz.

File metadata

  • Download URL: reflective-0.2.1.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for reflective-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d65c3098012c496bd35f0ed16f7df90f26afb47386dae4cd9e48c2e946b71e3d
MD5 58a15a3ba510146f1d3a9cad1292531e
BLAKE2b-256 d3b9fa98818df55f1173d53efc4f94abdc40b1aaf518fabb2fde0913acc1260f

See more details on using hashes here.

File details

Details for the file reflective-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: reflective-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for reflective-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 504ebc8846361746a8b0bcf33526de5abc89d5735b4ce42bdb25a36ec92a7f6f
MD5 3caf04b560c645107fa9192a6c79faae
BLAKE2b-256 0f8d4cba8dca223f97d2c38ddee09016b4cc2ca0177ac7ac7bee2467f6ad7d1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page