From a21b5b9da454292ab44b2ac996860b6abde1d378 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 22 Nov 2024 03:24:36 +0100 Subject: [PATCH] docs: prepare first release v0.1.0 --- CHANGELOG.md | 4 +--- README.md | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f40ae..be80e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Upcoming features and fixes - -## [0.1.0] - (1979-01-01) +## [0.1.0] - (2024-11-22) - First release diff --git a/README.md b/README.md index 8706695..6dd8fc4 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,32 @@ _A lightweight package that provides rate-limited httpx transports._ +## Installation + +The package is published on [PyPI](). Install it, for example, with + +```sh +pip install httpx-limiter +``` + +## Usage + +For situations when you need to make a large number of asynchronous request with a +controlled number of requests per time, you can apply rate limiting to an HTTPX client +using the provided transport. If you want to be able to make ten requests per second, +for example, use the following: + +```python +import httpx +from httpx_limiter import AsyncRateLimitedTransport + +async with httpx.AsyncClient( + transport=AsyncRateLimitedTransport.create(rate=10, capacity=10), +) as client: + ... +``` + ## Copyright - Copyright © 2024 Moritz E. Beber. - Free software distributed under the [Apache Software License 2.0](./LICENSE). -