FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 97e27044 authored by Benjamin Woods's avatar Benjamin Woods
Browse files

Merge branch '2-dotenv' into 'main'

feat: add .env support

See merge request !6
parents 8a158ba8 c0c26be7
No related branches found
No related tags found
1 merge request!6feat: add .env support
Pipeline #632650 passed
...@@ -6,3 +6,4 @@ ...@@ -6,3 +6,4 @@
### Added ### Added
- POC/rough code for Wilson team - POC/rough code for Wilson team
- Added .env support
# Gitlab Stats # Gitlab Stats
This package has `.env` support. See [`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) for more information.
## CLI options ## CLI options
``` ```
......
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]] [[package]]
name = "certifi" name = "certifi"
...@@ -195,6 +195,20 @@ files = [ ...@@ -195,6 +195,20 @@ files = [
[package.extras] [package.extras]
windows-terminal = ["colorama (>=0.4.6)"] windows-terminal = ["colorama (>=0.4.6)"]
[[package]]
name = "python-dotenv"
version = "1.0.1"
description = "Read key-value pairs from a .env file and set them as environment variables"
optional = false
python-versions = ">=3.8"
files = [
{file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"},
{file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"},
]
[package.extras]
cli = ["click (>=5.0)"]
[[package]] [[package]]
name = "python-gitlab" name = "python-gitlab"
version = "4.8.0" version = "4.8.0"
...@@ -326,4 +340,4 @@ zstd = ["zstandard (>=0.18.0)"] ...@@ -326,4 +340,4 @@ zstd = ["zstandard (>=0.18.0)"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.9" python-versions = "^3.9"
content-hash = "9d43468718705504889900ced35bbe968a6e768db7dcf776d5559c36fde6f634" content-hash = "ab29ffbc1c5cfbd0fe3ab87ff07527213bba82ceb372fe4ec6fca86161dee5fc"
...@@ -12,6 +12,7 @@ ucam-gitlab-stats = "ucam_gitlab_stats.cli:app" ...@@ -12,6 +12,7 @@ ucam-gitlab-stats = "ucam_gitlab_stats.cli:app"
python = "^3.9" python = "^3.9"
python-gitlab = "^4.6.0" python-gitlab = "^4.6.0"
typer = "^0.12.3" typer = "^0.12.3"
python-dotenv = "^1.0.1"
[build-system] [build-system]
......
...@@ -4,10 +4,13 @@ from typing import List ...@@ -4,10 +4,13 @@ from typing import List
import gitlab import gitlab
import typer import typer
from dotenv import load_dotenv
from typing_extensions import Annotated from typing_extensions import Annotated
app = typer.Typer() app = typer.Typer()
load_dotenv()
def _get_gl(): def _get_gl():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment