Skip to main content

Generate example.env from .env file for documentation purposes

Project description

auto-example-env

A Python utility to generate example.env from your .env file for documentation purposes.

Installation

pip install auto-example-env

Usage

# Generate example.env from .env in current directory
auto-example-env

# Specify custom input/output files
auto-example-env --input .env --output example.env

Features

  • Converts export KEY=VALUE to export KEY=
  • Handles multiline quoted values (e.g., PEM certificates) by adding a comment above
  • Skips keys marked with # ignore (case insensitive)
  • Preserves comments and empty lines
  • Always overwrites example.env

Example

Given .env:

export API_KEY=secret
# ignore export SECRET=hidden
export CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----"

Generates example.env:

export API_KEY=
# Multiline value
export CERT=

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

auto_example_env-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_example_env-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file auto_example_env-1.0.0.tar.gz.

File metadata

  • Download URL: auto_example_env-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for auto_example_env-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7e7d46a3c9ede7edc5910e85995555c85b8f7fdcd14658c88ec3ea9d6af0f70d
MD5 ed97023dada662793029b179723a2182
BLAKE2b-256 c2a7d9f31f440d6df520a657f9d6b5d2ef75069e52774ad53cae4b76cdef0448

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_example_env-1.0.0.tar.gz:

Publisher: publish.yml on Lamanaable/auto-example-env

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auto_example_env-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_example_env-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c406c9ebd5ca17957b7e74879e7ec8a62a99add2b988942311ab96827c6b9282
MD5 6b52f1dede73d151a4e48704fbe53c68
BLAKE2b-256 d6e055be2e49b29f16bc4741d1567f394540d9b26ca0f8e90cab1b796b5b81fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_example_env-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Lamanaable/auto-example-env

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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