Skip to main content

项目License

简介

fast-license 是一个用于项目快速添加License功能的Python包,提供License生成、License更新、中间件等功能。

依赖性

基础依赖(安装fast-license时将自动安装):
  • cryptography
额外依赖(根据需求手动安装):
功能 依赖
中间件 fastapi、starlette
License更新接口 fastapi、starlette、pydantic、requests

安装

# 通过 pip 安装:
pip install fast-license

License生成

1. RSA生成

python -m fast_license generate-keys

2. 私钥输出

python -m fast_license print-key

3. License生成

python -m fast_license generate YYYY-mm-dd_HH:MM:SS

4. 打印License内容

python -m fast_license decrypt

中间件应用

from fast_license.middleware import LicenseMiddleware

app = FastAPI()
app.add_middleware(LicenseMiddleware, license_path={License路径}, private_key={私钥输出内容})

装饰器应用

from fast_license.license import LicenseDecorator

add_license = LicenseDecorator(license_path={License路径}, private_key={私钥输出内容})

@add_license
def func():
    pass

License接口

from fast_license.api_manager import APILicense

app = FastAPI()
api_license = APILicense(license_path={License路径}, private_key={私钥输出内容})

# 多机
api_license.register(hosts=[{ip1}, {ip2}], port={服务端口})

app.include_router(api_license.router)

Metadata

Release files for fast-license 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fast-license 0.1.2
File
fast_license-0.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
fast_license-0.1.2-cp311-cp311-manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
fast_license-0.1.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
fast_license-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
fast_license-0.1.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
fast_license-0.1.2-cp310-cp310-manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
fast_license-0.1.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
fast_license-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 1.4 MB

Release files / fast_license-0.1.2-cp311-cp311-win_amd64.whl

Download URL fast_license-0.1.2-cp311-cp311-win_amd64.whl
Size 154.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a12e06f8077516d17aebaf765f262de6c48a48b03eaba6a1e55d7a64e2b76070
BLAKE2b-256 checksum
How to use checksums
5ee863561b5628f7b0961a727dc8b3a8e63d06f956c9774f31645c463c49a32d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp311-cp311-manylinux_2_17_x86_64.whl

Download URL fast_license-0.1.2-cp311-cp311-manylinux_2_17_x86_64.whl
Size 199.1 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9d9b949d634bd2644f6aaa49a0d9730207922f90eee4b6a06491ce2c0ba7b15a
BLAKE2b-256 checksum
How to use checksums
e073d32d2eadb0990e7598cf76a505b571331357462a90929838f928582cb886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL fast_license-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Size 155.3 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dd0ec51525a952213f1d838f4577ac4b3d9b2f6b636fcb3a6b8f1b4286af68d6
BLAKE2b-256 checksum
How to use checksums
bc42a94f4965fe3504b4dc7ef3b4fa01c1110542960890db2578b94f761a4fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL fast_license-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 168.2 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
b46572a4627b925db0c042c64c2e56e87ae72a0f0dd34c213576b378d6aa7620
BLAKE2b-256 checksum
How to use checksums
ad13448d4eb9f6dae045b2561cb2690d1af97d4bece05ade2f25dab43c8790bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp310-cp310-win_amd64.whl

Download URL fast_license-0.1.2-cp310-cp310-win_amd64.whl
Size 153.1 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
9998aeac8e03d50c6d9725d559db7833ac1b68b9bc3395246c9de93845c418b7
BLAKE2b-256 checksum
How to use checksums
d922a6b2f75c0b2487bcef9f108c7166ba2986a61f31f1b6e064f9da3a9cc0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp310-cp310-manylinux_2_17_x86_64.whl

Download URL fast_license-0.1.2-cp310-cp310-manylinux_2_17_x86_64.whl
Size 197.4 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
eadc52b0e592fd3959c8de6bed1e550813e124ef73f31c209efc865f7d3842b1
BLAKE2b-256 checksum
How to use checksums
a2bb516c4f6e3333dd9436bd736b83b54a44711704c530b4334a3e3c51cf7a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL fast_license-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Size 155.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
345cd4991186c5ea3f1478cc6eb72680dc2adffdbd657b060948befc8a9e862d
BLAKE2b-256 checksum
How to use checksums
a60e4768f477bcb5d4e29a7df9cb35dabea6b92fd732d1b5d2d44c60ee161f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / fast_license-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl

Download URL fast_license-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Size 168.5 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
724c6dbab1fd45be5b1d5ea04c1ae3dc17352ede799a044e6f05d3ff489487fc
BLAKE2b-256 checksum
How to use checksums
73b81a1e145c417571a35a24578ba5c835f79e9395c96b6a7e1c3b48326ecf70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Security for fast-license 0.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page