Skip to content

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

License

Notifications You must be signed in to change notification settings

AzorianSolutions/reflective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages