Skip to main content
lynx
====

Simple python configuration library and format. The format is very similar to YAML with the enhancment of sections.

##Installation

Install the ``lynx`` package with [pip](<https://pypi.python.org/pypi/lynx>):

pip install lynx





##Example use

Configuration example:
```
# section example
section {
# fields
field1: myfield1 value
field2: Another field value

# lists
mylist: [5, mystr, value, 8]
}


# Another section
section2 {

# sub section example
my_section {
name: lynx
}

# sections can have same name.
my_section {
# multiline fields
Library description:|
Lynx is a python
Configuration library
supporting many features
including multiline fields!$%$!%#@
Yay!

myfloat: 5.3
}
}

```

Load the configuration:
```
>>> import lynx

# Load file
>>> with open("config.conf", "r") as fp:
... config = lynx.load(fp)

# Get the first section
>>> config[0].name()
'section'
>>> config[0].fields()
{'field2': 'Another field value', 'field1': 'myfield1 value', 'mylist': [5, 'mystr', 'value', 8]}

# Get sub sections
>>> config[1].sub_sections()
[<lynx.Section object at 0x7f4ab28dfdd0>, <lynx.Section object at 0x7f4ab28dfe10>]
>>> config[1].sub_sections()[0].name()
'my_section'
```



## Features

Features include:
* Sections
* Sub sections
* Lists
* Multiline fields
* Load & dump
* Types:
* Strings
* Integers
* Floats

Release files for lynx 0.3.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 lynx 0.3.1
File Size Uploaded
lynx-0.3.1.tar.gz 5.6 kB Details

Release files / lynx-0.3.1.tar.gz

Download URL lynx-0.3.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3d1d17d367ed340bb805e827926340a46bde346dbd9cb3565aad4083c0ae1a48
BLAKE2b-256 checksum
How to use checksums
aead82353da78e6ab95fce445c44afce6a1230fffe25f57c4652f27c2ecfc447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

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