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 | CodeQL | Build |
---|---|---|
dev |
||
0.2.0 |
||
0.2.1 |
- Branch Status
- TL;DR
- Installation
- Project Documentation
- Security Policy
- Support Policy
- Code of Conduct
- License
- Donate
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.
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 .
For information about the project such as feature planning, the roadmap, and milestones, then please see the Project Information section of the wiki.
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!
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.
For information about how the library is designed and actually works, please visit the Development Guide section of the wiki.
For information on how to create and execute automated library tests, please visit the Testing Guide section of the wiki.
Please see our Security Policy.
Please see our Support Policy.
Looking to chat with someone? Join our Discord Server.
Please see our Code of Conduct.
This project is released under the MIT license. For additional information, see the full license.
Like my work?
Want to sponsor me? Please visit my organization's sponsorship page.