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; docs to py310;
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.1.tar.gz
.
File metadata
- Download URL: drain_swamp_snippet-1.0.1.tar.gz
- Upload date:
- Size: 72.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3e6676ce899e03783b32966b2800ab92755952592074c9699a0455ab723b0bf |
|
MD5 | 03e5afe4c99e7cc8dd8651ee7bd7cdf3 |
|
BLAKE2b-256 | bc5343220a46f9d7cc6cf1287bd3a2747d89f56b9be6e3ad25b7582a7c8de4ee |
File details
Details for the file drain_swamp_snippet-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: drain_swamp_snippet-1.0.1-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37700875067d23a7d793357badee22667cf7b516bc5fd6c4a20f46bb938e8928 |
|
MD5 | 0e63380f1fa13c96ca5d8fe1832fb626 |
|
BLAKE2b-256 | 68f5a3416acd68092e09c48b867826fe71e6b66b2ce10fff048e433a8972f904 |