Skip to main content

Python bindings for the aam-rs AAML configuration parser

Project description

aam-rs Python bindings

Python bindings for aam-rs with support for parsing, merging, reverse lookups, and deep alias resolution.

Install

pip install aam-py

Quick start

from aam_py import AAML

doc = AAML.parse("host = localhost\nport = 8080")
print(doc.find_obj("host"))

More examples

from aam_py import AAML

doc = AAML.parse("""
root = /srv/app
active = root
env = production
""")

print(doc.find_deep("active"))      # /srv/app
print(doc.find_key("production"))   # env
print(doc.find_obj("production"))   # env (reverse lookup fallback)
doc = AAML.parse("a = 1")
doc.merge_content("b = 2\na = 3")
print(doc.find_obj("a"))  # 3
print(doc.find_obj("b"))  # 2

AAML syntax refresher

# comments
host = localhost
port = 8080

@import common.aam

base = /srv
current = base

Local development checks

cargo test

If you work on packaging/bindings, also run the relevant CI matrix jobs from this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

aam_py-2.5.1-cp38-abi3-manylinux_2_34_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

File details

Details for the file aam_py-2.5.1-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for aam_py-2.5.1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b12a94fd373c24811db34bf5e014e9da565d7eee520531e762375b32ae5b55ad
MD5 5e4ca2931f89cde5642ffe89191585b9
BLAKE2b-256 84a2f882332665d5aa7f4fd4a95890989cabc1345ba97d9c8792d44212849256

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