A configuration definition language
Project description
confScript
don't think it is another *script language!!
It can do a lot..
install via pip
pip install confscript
let's get started!
some basic concepts:
- headers have this syntax:
== name ==
header can be anything example: "C++" or "@(@(@(@(@!!!" anything!
- keyword and value have this syntax:
keyword : value
here, value can be a string or number or True or False..
- What about lists?
lists values are separated by a ","
example:
== header ==
key : value1,value2,value3
- what separates data headers?
all headers are separated by a ---
okay? now, look at this data:
== Python ==
extensions : .py,.pyw,etc,etc
command : python (filepath)
---
== JavaC ==
extensions : .java,
command : javac (filepath) && java (filebasename)
Example data:
== TestingData ==
lucky word : python
lucky number : 10
is lucky-number really lucky? : True
---
== Employee ==
name: George
age: 30
country: United Kingdom
email: george.the.great@cube.co.net.com
it will become:
{'TestingData': {'lucky word': 'python', 'lucky number': 10, 'is lucky-number really lucky?': True}, 'Employee': {'name': 'George', 'age': 30, 'country': 'United Kingdom', 'email': 'george.the.great@cube.co.net.com', 'IPv6 address (lol)': 'C0BE:5BC6:F8F0:FAB4:EB59:482F:C4D3:4DFD'}}
so what's in this module?
there are 3 functions:
read(str) : convert confscript data to python dict & return the dict
readFile(str) : read the given file which contains the data & return the dict
dump(dict) : convert dict to confscript & return confscript data
simple! isn't it?
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file confscript-1.5-py3-none-any.whl
.
File metadata
- Download URL: confscript-1.5-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 261abd75af16fac239609d43ba285780db8fbb21bfd9b689a44b587558d42956 |
|
MD5 | 2898f763ad88e17aba44f59eb77d7185 |
|
BLAKE2b-256 | e1fb8d4a1ae8f10333ad7c951750af51f97903b8c1bc2a97747e15e2456bf366 |