{"id":44700,"library":"decouple-types","title":"decouple-types","description":"Provides typed versions of the popular python-decouple configuration library for cleaner and safer environment variable handling. Current version is 1.0.2, with a slow release cadence. It adds type hints and Pydantic-style validation to decouple settings.","status":"active","version":"1.0.2","language":"python","source_language":"en","source_url":"https://github.com/Danthewaann/decouple-types","tags":["decouple","typed-config","pydantic","environment","configuration"],"install":[{"cmd":"pip install decouple-types","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency for configuration parsing","package":"python-decouple","optional":false},{"reason":"Optional but recommended for typed settings validation","package":"pydantic","optional":true}],"imports":[{"wrong":"from decouple_types import TypedConfig","symbol":"TypedConfig","correct":"from decouple_stubs import TypedConfig"}],"quickstart":{"code":"from decouple_types import TypedConfig\nfrom pydantic import Field\nfrom typing import Optional\nimport os\n\nclass Settings(TypedConfig):\n    DATABASE_URL: str = Field(os.environ.get('DATABASE_URL', 'sqlite:///default.db'))\n    DEBUG: bool = Field(default=False)\n    SECRET_KEY: Optional[str] = Field(None)\n\nsettings = Settings()\nprint(settings.DATABASE_URL)\nprint(settings.DEBUG)","lang":"python","description":"Define typed settings with Pydantic fields, automatically populated from environment variables via decouple."},"warnings":[{"fix":"Either call `from decouple import config` and set variables, or use a decouple repository like `RepositoryEnv('.env')`.","message":"decouple-types does not automatically read .env files. You must call decouple's config or use python-decouple's repository explicitly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `cast` or pydantic validators to handle empty strings appropriately.","message":"Field default values are used as fallbacks, but if the environment variable is set to empty string, it will override the default with empty string.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.2':25 'add':32 'cadenc':30 'cleaner':16 'config':46 'configur':13,49 'current':22 'decoupl':2,12,41,43 'decouple-typ':1 'environ':19,48 'handl':21 'hint':34 'librari':14 'popular':9 'provid':4 'pydant':37,47 'pydantic-styl':36 'python':11 'python-decoupl':10 'releas':29 'safer':18 'set':42 'slow':28 'style':38 'type':3,5,33,45 'typed-config':44 'valid':39 'variabl':20 'version':6,23","created_at":"2026-06-07T12:51:24.859432+00:00","updated_at":"2026-06-07T12:51:24.859432+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'decouple_stubs'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Danthewaann/decouple-types","github":"https://github.com/Danthewaann/decouple-types","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}