Skip to main content

drain-swamp-snippet

Change portions of static config files

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

* Python 3.11 through 3.15, PyPy-3.11

New in 1.0.x

integration with drain-swamp-action; all badges; drop py39 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

[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

Metadata

Release files for drain-swamp-snippet 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drain-swamp-snippet 1.0.3
File Size Uploaded Provenance Actions
drain_swamp_snippet-1.0.3.tar.gz 48.7 kB With provenance Details for drain_swamp_snippet-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drain-swamp-snippet 1.0.3
File Interpreter ABI Platform Actions
drain_swamp_snippet-1.0.3-py3-none-any.whl Python 3 none any Details for drain_swamp_snippet-1.0.3-py3-none-any.whl

Total release size: 74.8 kB

Release files / drain_swamp_snippet-1.0.3.tar.gz

Download URL drain_swamp_snippet-1.0.3.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
14befdad4e434f51ef19e717629e3de6d2dbe6cab7c6a8c73ed3494ebe47b634
BLAKE2b-256 checksum
How to use checksums
a0eda20ab65d63cde646fb0b5b37df7cbb5831c5fff397d502b95a94104b8f79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / drain_swamp_snippet-1.0.3-py3-none-any.whl

Download URL drain_swamp_snippet-1.0.3-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fc8655e130f843e215b878434c08fbe70837b8001dacd63f994606a77a00cf2
BLAKE2b-256 checksum
How to use checksums
75da07100bde2e2b0efba1a0c0de5a0ed6228baebedccdd26562b9e7f133ef03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for drain-swamp-snippet 1.0.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for drain_swamp_snippet-1.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page