semvec/pypi-packages huggingface dataset:
zwishh 0.1.18
Internal utils and SDKs for Zwishh services
License: MIT
Requires Python: >=3.11

# 🧰 zwishh – Internal SDK and Utilities

This package provides shared utilities and client SDKs for Zwishh's internal microservices.

It is intended for **internal use only** and should be used by trusted services inside the Zwishh platform infrastructure.

---

## 📦 What's Included

### 🔑 Authentication & Security
- `verify_service_api_key_dep`: FastAPI dependency for verifying internal service API keys
- `get_current_user_id_dep`: Extracts and validates the current authenticated user from headers

### 🧬 SDK Clients
Clients for accessing core Zwishh services:

- `OrdersClient` – create & fetch orders
- `CartClient` – manage cart state
- `DeliveryClient` – manage delivery state
- `CouponClient` – manage coupon state
- `InteractionClient` – manage interaction state
- `UserServiceClient` – manage user state
- `SellerServiceClient` – manage seller state


Each client:
- Uses async `httpx`
- Injects service-to-service API key headers
- Handles standard error responses
- Retries the request with exponential backoff

---

## 🛠 Installation

You can install it directly from PyPI:

```bash
pip install zwishh
AgoraIOTools 0.1.0
Agora token generation utilities
License: MIT
Requires Python: >=3.8

# Authenticate Users with a token

To enhance communication security, Agora uses tokens to authenticate users before they access the Agora service, or joining an RTC channel.

## Code structure

Under the `python3` directory:

* `/src/` contains the source code for generating a token, where `RtcTokenBuilder.py` is used for generating an RTC token, and `RtmTokenBuilder.py` is used for generating an RTM token.
* `/sample/` contains the sample code for generating a token, where `RtcTokenBuilderSample.py` is used for generating an RTC token, and `RtmTokenBuilderSample.py` is used for generating an RTM token.

## Generate a token with the sample code

This section takes `RtcTokenBuilderSample.py` as an example to show how to generate a token with the sample code.

Before proceeding, ensure that you have Python 3 as the development environment. Use the following command to check your current Python version:

`Python -V`

1. Download or clone the [Tools](https://github.com/AgoraIO/Tools) repository.

2. Open the `DynamicKey/AgoraDynamicKey/python/sample/RtcTokenBuilderSample.py` file, replace the value of `appID`, `appCertificate`, `channelName`, and `uid` with your own, and comment out the code snippets of `buildTokenWithUserAccount`.

3. Open your Terminal, navigate to the same directory that holds `RtcTokenBuilderSample.py`, and run the following command. The token is generated and printed in your Terminal window:

   ```
   python RtcTokenBuilderSample.py
   ```


## Reference

For a complete authentication flow between the app server and app client, see [Authenticate Your Users with Tokens]().