Change portions of static config files
Project description
Change portions of static config files
* Python 3.9 through 3.13, PyPy
New in 1.0.x
integration with drain-swamp-action; all badges;
New in 0.0.x
move snip from package drain-swamp;
Whats a snippet?
Within a configuration, there are times when some bit of text needs to be changed.
The only requirement is the file format should recognize pound symbol # as a comment.
A snippet without an snippet code (id)
before snippet
# @@@ editable
code block
# @@@ end
after snippet
A snippet with an snippet code (id)
before snippet
# @@@ i_am_a_snippet_co
code block
# @@@ end
after snippet
What batteries are included?
None
This is a base package. Other authors are encouraged to:
not reinvent the wheel
avoid packages with snippet implementations, when only just want the base class, Snip
Packages using drain-swamp-snippet-pypi
Acknowledgement
The technique and initial implementation is from Ned Batchelder
Ned Batchelder is also the author of cog which creates content by embedding both Python code and output in the original file.
Check out introduction to cog
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 Distribution
Built Distribution
File details
Details for the file drain_swamp_snippet-1.0.0.post1.tar.gz
.
File metadata
- Download URL: drain_swamp_snippet-1.0.0.post1.tar.gz
- Upload date:
- Size: 71.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2928689d338389b8a62d4ffa2d334a627effdaf995a9b53eb75439a8a706bc94 |
|
MD5 | 89c3aa0edd1ff64058175c068665a8d5 |
|
BLAKE2b-256 | 3634894b44dfb9a46319c4cc7aea4101728da477d81460cd675a3d980d100ca3 |
File details
Details for the file drain_swamp_snippet-1.0.0.post1-py3-none-any.whl
.
File metadata
- Download URL: drain_swamp_snippet-1.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4716607e6678484b398634e359bed983f4b8a9e8f2932733f8d61742d64c6b91 |
|
MD5 | 32e0d4eaad6694a1cd813175799c3068 |
|
BLAKE2b-256 | 9e3365861477917c6cf38a94ef8fdb58dcf79e8d0f503079d279580bdfe6fc01 |