httpx
typer
httpx | typer | |
---|---|---|
53 | 87 | |
12,274 | 14,398 | |
1.2% | - | |
8.9 | 8.7 | |
8 days ago | 2 days ago | |
Python | Python | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
httpx
-
A Retrospective on Requests
For reference, it's a butterfly, not a moth.
Source: https://github.com/encode/httpx/issues/834
-
Show HN: Twitter API Wrapper for Python – No API Keys Needed
Very cool, first I'm hearing of httpx https://www.python-httpx.org/
I think most people would start with trying out requests or something for this kind of work, I'm guessing that didn't work out? You've got a star from me.
-
Harlequin: SQL IDE for Your Terminal
To access 10 different commands at the same time, that is tricky but definitely doable.
First thing that comes to mind, you can use aliases.
To keep it simple, lets use 3 examples instead of 10: harlequin (this project), pgcli (https://www.pgcli.com/) and httpx (https://www.python-httpx.org/)
Setup a main home for all your venvs:
cd ~
-
HTTP Rate Limit
There are already some implementations for Python HTTP clients. One of them is aiometer. But it's not suitable for my use case. Since httpx already has the internal pool, it would be better to reuse the design.
-
Introducing Flama for Robust Machine Learning APIs
Besides, flama also provides support for SQL databases via SQLAlchemy, an SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. Finally, flama also provides support for HTTP clients to perform requests via httpx, a next generation HTTP client for Python.
-
Embracing Modern Python for Web Development
We can use the async HTTP client provided by httpx, a fully featured HTTP client for Python with an API broadly compatible with requests, so it can be used in pretty much the same way in most cases.
-
Didn't want to click on refresh to see updates, this is what I did!
httpx in place of requests library
-
Python Requests 3
The main value of Requests is that it provided an abstract interface on top of HTTP, which was designed well-enough to become a standard. But today it has fallen way behind in its field, and there are much better alternatives such as HTTPX [0].
[0] https://www.python-httpx.org/
-
Unlocking Performance: A Guide to Async Support in Django
HTTPX is a popular Python library that provides an asynchronous HTTP client, and it can be beneficial for enabling async support in Django. While Django itself does not require HTTPX for async support, using HTTPX in combination with Django's async views can bring several advantages:
-
Show HN: Python package for interfacing with ChatGPT with minimized complexity
The underlying library for both sync and async is httpx (https://www.python-httpx.org/) which may be limited from the HTTP Client perspective but it may be possible to add rate limiting at a Session level.
typer
- Typer: Python library for building CLI applications
- Copilot for your GitHub stars
-
Things I've learned about building CLI tools in Python
I have been using Typer on every one of my CLI projects which uses Click under the hood. The documentation is fantastic, the CLI app it produces looks great and lets you create things quickly. I high recommend it.
https://typer.tiangolo.com/
-
Things to do with standalone script
Adding CLI capabilities. My preferred library here is typer.
-
Where to start for managing a Python code base for public distribution
I just heard about this but it seems to be pretty much the type of thing you want and want fast.
-
Help on Docstrings
Docstrings are for documenting how a function/ class/ method/ module works. Often you don't need to add a docstring to your main function because no one will be importing it to use elsewhere. And if you want it to run as a CLI, then there are better ways to document the available options. For example, typer does most of it for you, or in click you add the help text to the decorator.
-
Which best practices do you follow to build robust & extensible ETL jobs?
Most computing tasks in airflow DAGs are KubernetesPodOperator containing a CLI (Python Typer). It allows us to pass arguments easily to run DAG manually if needed (the new UI to pass arguments to DAG in airflow 2.6 is really nice). Arguments allow us to replay DAG easily (change start / end dates for instance).
-
Devs on teams that deploy anytime you want, what does your SDLC workflow look like?
So it's basically the main .gitlab-ci.yml file plus a separate Python CI app using Typer for the AWS instrumentation.
-
The different uses of Python type hints
Similarly for Typer, which is literally "the FastAPI of CLIs"[1]. Handy to type your `main` parameters and have CLI argument parsing. For more complicated cases, it's a wrapper around Click.
[1] https://typer.tiangolo.com/
-
Command line parser library, which one do you like the most, regardless of language?
interesting that you hate python, but love Click. Did you try Typer which uses Click underneath?
What are some alternatives?
AIOHTTP - Asynchronous HTTP client/server framework for asyncio and Python
click - Python composable command line interface toolkit
Niquests - Requests but with HTTP/3, HTTP/2, Multiplexed Connections, System CAs, Certificate Revocation, DNS over HTTPS / TLS / QUIC or UDP, Async, DNSSEC, and (much) pain removed!
Python Fire - Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.
requests-html - Pythonic HTML Parsing for Humansâ„¢
Gooey - Turn (almost) any Python command line program into a full GUI application with one line
requests - A simple, yet elegant, HTTP library.
rich - Rich is a Python library for rich text and beautiful formatting in the terminal.
Flask - The Python micro framework for building web applications.
python-prompt-toolkit - Library for building powerful interactive command line applications in Python
starlette - The little ASGI framework that shines. 🌟
cement - Application Framework for Python