httpx
pydantic
httpx | pydantic | |
---|---|---|
60 | 176 | |
13,809 | 22,902 | |
1.4% | 2.9% | |
8.3 | 9.8 | |
18 days ago | 3 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
-
How to scrape Bluesky with Python
Using the createSession, deleteSession endpoints and httpx, we can create a session for API interaction.
-
Ruff: Python linter and code formatter written in Rust
I've mostly ditched requests in favour of httpx these days. https://www.python-httpx.org
-
Asynchronous HTTP Requests in Python with HTTPX and asyncio
Now that your environment is set up, you’re going to need to install the HTTPX library for making requests, both asynchronous and synchronous which we will compare. Install this with the following command after activating your virtual environment:
-
Video data IO through ffmpeg subprocess
Now time to code the implementation, as I wanted to both read from and write to ffmpeg concurrently, so this is going to be an asyncio application. The http client library we are using this time is httpx, which has a method to fetch download in smaller batches:
-
HTTPX: Dump requests library in a junkyard 🚀
The concept of a Client in httpx is analogous to a Session in requests. However, httpx.Client is more powerful and efficient. You can read the article from the httpx documentation, to learn more about httpx.Client.
-
Current problems and mistakes of web scraping in Python and tricks to solve them!
Let's look at a simple code example. This will work for requests, httpx, and aiohttp with a clean installation and no extensions.
- Httpx – next-generation HTTP client for Python
-
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 ~
pydantic
- Resumindo caracterĂsticas da linguagem Python
-
FastAPI, Pydantic, Psycopg3: the holy trinity for Python web APIs
Pydantic is bundled with FastAPI and is excellent for modelling, validating, and serialising API responses.
-
Pydantic Settings + AWS the easy way
Pydantic Settings is a python library that extends 🚀 Pydantic for dealing with settings management.
-
Understanding FastAPI: How OpenAPI works
And here is where FastAPI ✨ shines: It leverages Pydantic powerful data validation to offer out of the box JSON Schema and OpenAPI specs via Swagger and Redoc.
-
Checkbox Extraction from PDFs - A Tutorial
If you carefully think about it, the system that extracts raw text from the PDF needs to both detect and render PDF form elements like checkboxes and radiobuttons in a way that LLMs can understand. In this example, we’ll use LLMWhisperer to extract PDF raw text representing checkboxes and radiobuttons. You can use LLMWhisperer completely free for processing up to 100 pages per day. As for structuring the output from LLMWhisperer, we’ll use GPT3.5-Turbo and we’ll use Langchain and Pydantic to help make our job easy.
-
Table Extraction and Processing from PDFs - A Tutorial
Pydantic: Use Pydantic to declare your data model. This output parser allows users to specify an arbitrary Pydantic Model and query LLMs for outputs that conform to that schema.
-
Supercharge Your Python Toolkit with These Powerful Tools
1. Pydantic: Ultimate Data Validation
-
JSON extra uses orjson instead of ujson
I'm really surprised ijl got angry that his mail was quoted, it looks innocent enough to me.
For reference it's been edited out here: https://github.com/pydantic/pydantic/issues/589
But github shows edits, so the edit is meaningless for privacy. Here's the original mail (yes, I'm blatantly ignoring his request to not publish this, I'm just this evil.)
I've looked into replacing ujson in pydantic with orjson
-
Advanced RAG with guided generation
First, note the method prefix_allowed_tokens_fn. This method applies a Pydantic model to constrain/guide how the LLM generates tokens. Next, see how that constrain can be applied to txtai's LLM pipeline.
-
utype VS pydantic - a user suggested alternative
2 projects | 15 Feb 2024
utype is a concise alternative of pydantic with simplified parameters and usages, supporting both sync/async functions and generators parsing, and capable of using native logic operators to define logical types like AND/OR/NOT, also provides custom type parsing by register mechanism that supports libraries like pydantic, attrs and dataclasses
What are some alternatives?
Niquests - “Safest, Fastest, Easiest, and Most advanced” Python HTTP Client. Production Ready! Drop-in replacement for Requests. HTTP/1.1, HTTP/2, and HTTP/3 supported. With WebSocket, and SSE! Be free of Requests bondage now.
msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
AIOHTTP - Asynchronous HTTP client/server framework for asyncio and Python
typeguard - Run-time type checker for Python
requests - A simple, yet elegant, HTTP library.
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.