Skip to content

juancarlospaco/thatlib

Repository files navigation

ThatLib

Benchmark Results

Using Pathlib can make your project +50x Slower

Using Pathlib can make your project 50x Slower

Use

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.

Examples:

# 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

Requisites

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

PYPI

Dependencies

  • None.

💰➡️🍕

Bitcoin BTC

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

BTC Bitcoin Network

1Pnf45MgGgY32X4KDNJbutnpx96E4FxqVi

Lightning Network

juancarlospaco@bitrefill.me
Ethereum ETH Dai DAI Uniswap UNI Axie Infinity AXS Smooth Love Potion SLP Uniswap UNI USDC

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e
Tether USDT

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e

TRC20 Tron Network

TWGft53WgWvH2mnqR8ZUXq1GD8M4gZ4Yfu
Solana SOL

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

SOL Solana Network

FKaPSd8kTUpH7Q76d77toy1jjPGpZSxR4xbhQHyCMSGq
Cardano ADA

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ADA Cardano Network

DdzFFzCqrht9Y1r4Yx7ouqG9yJNWeXFt69xavLdaeXdu4cQi2yXgNWagzh52o9k9YRh3ussHnBnDrg7v7W2hSXWXfBhbo2ooUKRFMieM
Sandbox SAND Decentraland MANA

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e
Algorand ALGO

ALGO Algorand Network

WM54DHVZQIQDVTHMPOH6FEZ4U2AU3OBPGAFTHSCYWMFE7ETKCUUOYAW24Q
Polkadot DOT

DOT Network

13GdxHQbQA1K6i7Ctf781nQkhQhoVhGgUnrjn9EvcJnYWCEd

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e
Binance

https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3

Stars

@juancarlospaco@hamidb80@nikitavoloboev@mxschmitt@harrtho@kangkot@crox-safe@carno@xdroff@tumregels@Pebaz@Siss3l@daweedkob@xilicode@pietroppeter@linwaytin@thomas-mckay@hansalemaos@benzolium@T145@Xynonners@BlackNurse@xjzh123@JoeBarouneD