Skip to main content

An all-repos extension to read values from environment variables.

Project description

all-repos-envvar

CI Status Test coverage percentage

Poetry Ruff pre-commit

PyPI Version Supported Python versions License


Source Code: https://github.com/browniebroke/all-repos-envvar


An all-repos extension to read values from environment variables.

[!IMPORTANT] As of all-repos v1.25, you may not need this package, see section below

Installation

Install this via pip (or your favourite package manager):

pip install all-repos-envvar

Usage

This library should be installed alongside all-repos so that it's findable at import time. It provides a custom source and push to get the GitHub API key from an environment variable GITHUB_API_KEY (reading from and .env file is also supported), allowing you to omit it from the config:

{
  "output_dir": "output",
  "source": "all_repos_envvar.source",
  "source_settings": {
    "username": "browniebroke"
  },
  "push": "all_repos_envvar.push",
  "push_settings": {
    "username": "browniebroke"
  }
}

The source module extends all_repos.source.github and the push module extends all_repos.push.github_pull_request.

Why

I wanted this feature, but at the time, it looked like it would never be implemented in the main repo, hence this little extension. Since then, the author of all-repos apparently changed their mind and support for reading from environment variable was added in early 2023, and it's now included since release v1.25.0.

The only extra feature that this package provides is to read from .env file, but this can be achieved by more general solutions like direnv.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Bruno Alla

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.

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

all_repos_envvar-1.1.7.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

all_repos_envvar-1.1.7-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file all_repos_envvar-1.1.7.tar.gz.

File metadata

  • Download URL: all_repos_envvar-1.1.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for all_repos_envvar-1.1.7.tar.gz
Algorithm Hash digest
SHA256 40ec4deb5e1c80deabde7eb45863600ed65ab484fae58da1a58e7b2b5439a361
MD5 e321a51bf06d1c3826b28e1c2c06f7b4
BLAKE2b-256 66f9f4e5cf511cf533c0ae1ebedd355a7ecc64bd4dee1ac2b8ef3eaade7441a4

See more details on using hashes here.

File details

Details for the file all_repos_envvar-1.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for all_repos_envvar-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d9955c082ce808be8c776fba25b370e05ecb20e484f4acb2079e17d801c22756
MD5 84ab00c60fb50cc5f9ea28ed287604a8
BLAKE2b-256 1991ba1718927181d28ef08ad0af9c8619392e5e805d02c2420bc341706645a3

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