How to Properly Configure httpx URL in Settings for a Python Project?

10 Replies, 2289 Views

Hey! I’ve been using `pydantic-settings` for handling httpx url in settings python, and it’s been a game-changer. It lets you define your settings as a class and automatically pulls from env vars.

Here’s a quick example:

```python
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
httpx_url: str

settings = Settings()
```

Super clean and works great for different environments. Give it a shot!

Messages In This Thread



Users browsing this thread: 1 Guest(s)