semvec/pypi-packages huggingface dataset:
business-card-qr 0.1.0
Generate professional vCard QR codes with custom styling
License: MIT
Requires Python: >=3.8
Keywords: qr-code, vcard, business-card, qr-generator

# Business Card QR Code Generator

Generate professional vCard QR codes with custom styling for business cards.

## Features

- 🎨 Custom colors and gradients
- 🔲 Rounded corners with anti-aliasing
- 🖼️ Logo embedding (PNG/JPG)
- 📱 vCard format for easy contact import
- 🎯 High error correction for reliable scanning
- 🖥️ Beautiful Streamlit interface

## Installation
```bash
pip install business-card-qr
```

## Usage

### Web Interface

Run the Streamlit app:
```bash
business-card-qr
# or
streamlit run -m business_card_qr.app
```

### Python API
```python
from business_card_qr import BusinessCardQRGenerator
from PIL import Image

# Create vCard data
vcard = """BEGIN:VCARD
VERSION:3.0
FN:John Doe
ORG:Example Company
EMAIL:john@example.com
END:VCARD"""

# Generate QR code
qr_gen = BusinessCardQRGenerator(vcard)
qr_img = qr_gen.generate_custom(
    rounded=True,
    fill_color="black",
    back_color="white"
)

# Save
qr_img.save("business_card_qr.png")
```

## Requirements

- Python 3.8+
- qrcode[pil]
- Pillow
- streamlit

## License

MIT License
fastapi-cdn-host 0.10.0
Auto choose the fastest cdn host for fastapi project docs.
License: MIT
Requires Python: >=3.10

# FastAPI CDN host Selector for docs ui
![Python Versions](https://img.shields.io/pypi/pyversions/fastapi-cdn-host)
[![LatestVersionInPypi](https://img.shields.io/pypi/v/fastapi-cdn-host.svg?style=flat)](https://pypi.python.org/pypi/fastapi-cdn-host)
[![GithubActionResult](https://github.com/waketzheng/fastapi-cdn-host/workflows/ci/badge.svg)](https://github.com/waketzheng/fastapi-cdn-host/actions?query=workflow:ci)
[![Coverage Status](https://coveralls.io/repos/github/waketzheng/fastapi-cdn-host/badge.svg?branch=main)](https://coveralls.io/github/waketzheng/fastapi-cdn-host?branch=main)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)

Auto find swagger-ui in local files, if exist use them.
Otherwise make concurrent http requests by httpx to find out which third part cdn host(cdn.jsdelivr.net/unpkg.com/cdnjs.cloudflare.com/cdn.staticfile.org) is the fastest one.


**English** | [中文](./README.zh.md)

## Install

```bash
pip install fastapi-cdn-host
```

## Usage
```py
import fastapi_cdn_host
from fastapi import FastAPI

app = FastAPI()
# include_routes ...

fastapi_cdn_host.patch_docs(app)
```
See more at:
- [examples/](https://github.com/waketzheng/fastapi-cdn-host/tree/main/examples)
- [tests/](https://github.com/waketzheng/fastapi-cdn-host/tree/main/tests)

## Detail
1. Let's say that the default docs CDN host https://cdn.jsdelivr.net is too slow in your network, while unpkg.com is much faster.
```py
import fastapi_cdn_host
from fastapi import FastAPI

app = FastAPI()
fastapi_cdn_host.patch_docs(app)  # Will use `unpkg.com`(or other faster host) to replace the `cdn.jsdelivr.net/npm`
```
2. To support offline docs/, put swagger-ui asset files into local directory named `static`
```py
from pathlib import Path

fastapi_cdn_host.patch_docs(app, Path(__file__).parent.joinpath('static'))
```
This get the same result of the example in official document:
https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/?h=static#self-hosting-javascript-and-css-for-docs

3. If asset files are ready in private cdn
```py
from fastapi_cdn_host import AssetUrl

fastapi_cdn_host.patch_docs(
    app,
    cdn_host=AssetUrl(
        js='http://my-cdn.com/swagger-ui.js',
        css='http://my-cdn.com/swagger-ui.css',
        redoc='http://my-cdn.com/redoc.standalone.js',
        favicon='http://my-cdn.com/favicon.ico',
    )
)
```

## License

[MIT](./LICENSE)