fast_captcha
fast to use captcha
Install
pip install fast-captcha
Text Captcha
from fast_captcha import text_captcha
print(text_captcha()) # BnZU
Image Captcha
from fast_captcha import img_captcha
img, text = img_captcha()
print(img) # <_io.BytesIO object at 0x000002366AB93DB0>
print(text) # 2z22
FastAPI
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from fast_captcha import img_captcha
app = FastAPI()
@app.get('/captcha', summary='captcha', name='captcha')
def get_captcha():
img, text = img_captcha()
return StreamingResponse(content=img, media_type='image/jpeg')
Django-Ninja
from ninja import NinjaAPI
from django.http import StreamingHttpResponse
from fast_captcha import img_captcha
app = NinjaAPI()
@app.get('/captcha', summary='captcha', url_name='captcha')
def get_captcha(request):
img, text = img_captcha()
return StreamingHttpResponse(streaming_content=img, content_type='image/jpeg')
Metadata
Release files for fast_captcha 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_captcha-0.3.2.tar.gz | 1.2 MB | Without provenance | Details for fast_captcha-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_captcha-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for fast_captcha-0.3.2-py3-none-any.whl |
Total release size: 2.4 MB
Release files / fast_captcha-0.3.2.tar.gz
| Download URL | fast_captcha-0.3.2.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b68437b01726e5c698e5b0e4784a7a495d5e98a0b77ddff873925057fd67d517
|
|
BLAKE2b-256 checksum How to use checksums |
74864751bffdd88e7ac0633a98668f3d474935996c1477b058025cc9f39aa6d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.15.3 CPython/3.10.11 Windows/10
|
Release files / fast_captcha-0.3.2-py3-none-any.whl
| Download URL | fast_captcha-0.3.2-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3823ca0e53baa5cf57d0eb103e8353d2480c5cffda8d7aedcfb39e22844ac15
|
|
BLAKE2b-256 checksum How to use checksums |
26055bfd827745616034e78d99a7547f2398dcb9503eaa9b19e84fb3dc9e87ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.15.3 CPython/3.10.11 Windows/10
|
Security for fast_captcha 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.