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 .

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-0.1.0.tar.gz (2.9 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-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for auto_example_env-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b4ace3f0639c284062cee683bc1e05b0ae955fb8b74e6cc357477aa8c6b5878
MD5 d91c3e35781f317ad6fad6a496fb55d3
BLAKE2b-256 dd4ba6d6ced5ad020c48bf3ead2796d5fc42a44d3c3cbb604679278572ebbd06

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_example_env-0.1.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-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_example_env-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1337bbeeb048fb58d0005c0ef929cec584ece381ba8f37d863aef53cfbedceb2
MD5 a21163f9f75ef3d337292d498eb85510
BLAKE2b-256 1291a4ef7c0c33592f8159637ec817e53dd1d24bfc220cae4ddd2fc3d6f76ba5

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_example_env-0.1.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