Skip to main content

Change portions of static config files

Project description

Change portions of static config files

PyPI status drain-swamp coverage percentage License
last commit to gauge activity Test suite status Quality check status Documentation
Python versions supported implementations
platforms black
downloads GitHub stars
msftcangoblowme on Mastodon

* 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

[read more]

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drain_swamp_snippet-1.0.0.post1.tar.gz (71.2 kB view details)

Uploaded Source

Built Distribution

drain_swamp_snippet-1.0.0.post1-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file drain_swamp_snippet-1.0.0.post1.tar.gz.

File metadata

File hashes

Hashes for drain_swamp_snippet-1.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 2928689d338389b8a62d4ffa2d334a627effdaf995a9b53eb75439a8a706bc94
MD5 89c3aa0edd1ff64058175c068665a8d5
BLAKE2b-256 3634894b44dfb9a46319c4cc7aea4101728da477d81460cd675a3d980d100ca3

See more details on using hashes here.

File details

Details for the file drain_swamp_snippet-1.0.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for drain_swamp_snippet-1.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 4716607e6678484b398634e359bed983f4b8a9e8f2932733f8d61742d64c6b91
MD5 32e0d4eaad6694a1cd813175799c3068
BLAKE2b-256 9e3365861477917c6cf38a94ef8fdb58dcf79e8d0f503079d279580bdfe6fc01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page