Awesome Open Source
Awesome Open Source


Benchmark Results

Using Pathlib can make your project +50x Slower

Using Pathlib can make your project 50x Slower


Type-safe DotEnv

Thatlib has builtin support for Type-safe .env. Type-safe .env file is just a .env but Typed.

Types are enforced via a comment, so it is still a "vanilla" .env.

Type-safe .env file can be used with unsafe .env parsers, legacy parsers will ignore the comment.

Keys must be a non-empty ASCII string [a-zA-Z0-9_], keys are validated. Key-Value separator must be =.

Parses the same .env file from the vanilla implementation tests.

Several orders of magnitude faster than the vanilla implementation. Implementation is ~ 50 lines of code.


# This is a comment
DB_HOST=localhost  # string
DB_USER=root       # string
DB_PASS="123"      # string
DB_TIMEOUT=42      # int
DELAY=3.14         # float
ACTIVE=true        # bool


  • Python 1.x or 2.x or 3.x, 64Bit, CPython implementation.



  • None.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,137,692
Path (539
Cython (513
Speed (253
Related Projects