This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from enum import Flag | |
from typing import Any | |
class EnvFlag: # Descriptor | |
def __init__(self, name: str) -> None: | |
self.name = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Publish to test.pypi.org | |
poetry build | |
poetry config repositories.test-pypi https://test.pypi.org/legacy/ | |
poetry config pypi-token.test-pypi pypi-TOKEN # Token from: https://test.pypi.org/manage/account/token/ | |
poetry publish -r test-pypi | |
# Publish to pypi.org | |
poetry build | |
poetry config pypi-token.pypi pypi-XXXXXXXX # Token from: https://pypi.org/manage/account/token/ | |
poetry publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from django.views import debug | |
HIDDEN_DEFAULT = 'API|TOKEN|KEY|SECRET|PASS|' | |
debug.HIDDEN_SETTINGS = re.compile( | |
f'{HIDDEN_DEFAULT}ADDED_NAME|ANOTHER_ADDED_NAME', | |
flags=re.IGNORECASE) | |