chibi_nginx
python lib for parse nginx conf files
Free software: WTFPL
Documentation: https://chibi-nginx.readthedocs.io.
Install
pip install chibi-nginx
Usage
cat > /etc/nginx/sites_available/default.conf << 'endmsg'
# vi: set ft=nginx:
server {
server_name $hostname nginx;
listen 80;
access_log /var/log/nginx/default_access.log;
error_log /var/log/nginx/default_error.log;
root /var/www/default/;
index index.html;
}
endmsg
from chibi_nginx import Chibi_nginx
tmp = Chibi_nginx( '/etc/nginx/sites_available/default.conf' )
result = tmp.read()
expected = {
'server': {
'server_name': '$hostname nginx',
'listen': '80',
'access_log': '/var/log/nginx/default_access.log',
'error_log': '/var/log/nginx/default_error.log',
'root': '/var/www/default/',
'index': 'index.html'}
}
assert result == expected
result[ 'server' ][ 'root' ] = '/home/user/default_site/'
tmp.write( result )
new_result = tmp.read()
assert new_result[ 'server' ][ 'root' ] = '/home/user/default_site/'
Features
read and write config files of nginx
History
1.0.0 (2026-01-28)
@nbtm-sh add support for single word keywords
0.2.1 (2022-03-24)
a more proper readme
0.2.0 (2022-03-19)
improvent in the output when write or change a .conf file
0.1.0 (2022-01-25)
read and write .conf files of nginx
0.1.0 (2021-10-25)
First release on PyPI.
Metadata
Release files for chibi-nginx 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chibi_nginx-1.0.0.tar.gz | 9.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chibi_nginx-1.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.8 kB
Release files / chibi_nginx-1.0.0.tar.gz
| Download URL | chibi_nginx-1.0.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d5572e0bc7310ead58f8a9f7be926afd162ad9c17da7e31c3624c2fb88ab296
|
|
BLAKE2b-256 checksum How to use checksums |
12bf9082528ca36fe84608a625b18d55ed69926ddad67627ee9e6b3f4f88ab36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / chibi_nginx-1.0.0-py2.py3-none-any.whl
| Download URL | chibi_nginx-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e01e7ddbc522613c1105ad187e35cc59ffaf7f69b693380235df50602e252326
|
|
BLAKE2b-256 checksum How to use checksums |
3ec21affa5ef3282238dc1325693dcb0c9f35ebf878cd2a35353aa8f23a15b09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for chibi-nginx 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.