Skip to main content

PyPI version

sprinkles

Sprinkles makes it easy to share configuration files between local dev environments without leaking private information. No more passwords in Slack PMs, no more API keys in VCS.

Installation

pip install sprinkles-config

Please note that sprinkles has only been tested for Python versions >= 3.6.

Usage

Sprinkles reads secrets from AWS secrets manager, and binds them to a template you provide. The templating is based on Jinja2¹, making it flexible enough to work with any text-based configuration format you may be using. Anything from .env files, to Java properties, to yaml.

It has a simple param based CLI API, but can also be executed against a config file to encourage reuse. The config format is TOML-based².

NOTE: Sprinkles will use the AWS profile/credentials configured in the calling shell context, using the standard environment variables³.

CLI

  1. Output config to stdout
third.party.api.endpoint=https://example.com/api/v1
third.party.api.key={{THIRD_PARTY_API_KEY}}
sprinkles --template application.properties.j2 --secret-arn arn:aws:secretsmanager:<region>:<account-id-number>:secret:<secret-name>
  1. Output to file
sprinkles --template application.properties.j2 --secret-arn arn:aws:secretsmanager:<region>:<account-id-number>:secret:<secret-name> --output application.properties

Config file option

Sprinkles also makes it possible to have a set of defaults (tracked in VCS). Add a .sprinklesrc file in your project root. Simply run sprinkles in the project root to initialize the config.

.sprinklesrc

[secret]
arn = "arn:aws:secretsmanager:<region>:<account-id-number>:secret:<secret-name>"

[files]
  [files.docker-env]
    template = "sprinkles-templates/.env.sprinkles"
    target = ".env"
  [files.application-properties]
    template = "sprinkles-templates/application.properties.sprinkles"
    target = "src/main/com/example/resources/application-dev.properties"

References

  1. Jinja2: https://jinja.palletsprojects.com/en/2.11.x/
  2. TOML: https://github.com/toml-lang/toml
  3. AWS Configuration: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

Metadata

Release files for sprinkles-config 0.1.4

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

Source distribution (sdist)

Source distribution for sprinkles-config 0.1.4
File Size Uploaded Provenance Actions
sprinkles-config-0.1.4.tar.gz 4.0 kB Without provenance Details for sprinkles-config-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sprinkles-config 0.1.4
File Interpreter ABI Platform Actions
sprinkles_config-0.1.4-py3-none-any.whl Python 3 none any Details for sprinkles_config-0.1.4-py3-none-any.whl

Total release size: 8.7 kB

Release files / sprinkles-config-0.1.4.tar.gz

Download URL sprinkles-config-0.1.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9955162caa49164c17cc685f2c44064c282065949029e08c36f114d4f0299a4f
BLAKE2b-256 checksum
How to use checksums
da41df093abf78de076e92b0732fbb9cb087fbec474bf9f3089a81d071becefb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.6.11 Darwin/19.4.0

Release files / sprinkles_config-0.1.4-py3-none-any.whl

Download URL sprinkles_config-0.1.4-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42201f7a5d526d112b386d0314a6746a79c01d62629bf812cfd4670c9509832e
BLAKE2b-256 checksum
How to use checksums
db2e12b6a1e81b615ad674e2baa514971061eeb70f704e9599815bc9b378f720
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.6.11 Darwin/19.4.0

Security for sprinkles-config 0.1.4

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.

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