Skip to main content

FastAPI Misskey

このライブラリはFastAPIにMisskeyの認証を作成するお手伝いをするライブラリです

Example

from typing import Optional

from fastapi import Depends, FastAPI

from fastapi_misskey.client import MisskeyAuthClient

app = FastAPI()
misskey = MisskeyAuthClient(
    'https://example.com',
    'test',
    'http://localhost:8000/callback',
    description='FastAPI Misskey Auth'
)


@app.get('/login')
async def login():
    return {'url': await misskey.get_auth_url()}


@app.get('/callback')
async def callback(session: Optional[str] = None, token: Optional[str] = None):
    token, user = await misskey.get_access_token(session, token)
    return {'token': token, 'user': user}


@app.get('/profile')
async def profile(user=Depends(misskey.get_user)):
    if user.get('error'):
        return user
    else:
        return {'user': user}

Inspired by

fastapi-discord

Thanks to @Tert0

Metadata

Release files for fastapi-misskey 0.0.1

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

Source distribution (sdist)

Source distribution for fastapi-misskey 0.0.1
File Size Uploaded Provenance
fastapi_misskey-0.0.1.tar.gz 3.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-misskey 0.0.1
File Interpreter ABI Platform
fastapi_misskey-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / fastapi_misskey-0.0.1.tar.gz

Download URL fastapi_misskey-0.0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7868f54ca7d3bd929c38e475084fa54b26830d4d2d9ccf7bf907a1bb096edc59
BLAKE2b-256 checksum
How to use checksums
a84ce6fd66d8cb4284de42ab89f4ffa59034a0fff1e16823a77271ad5caaa318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / fastapi_misskey-0.0.1-py3-none-any.whl

Download URL fastapi_misskey-0.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52a59be30df4f1552ee13b95dab61cae69062b6fe2cff9920ea4bef292281bae
BLAKE2b-256 checksum
How to use checksums
d2bd1cd6a5f476b08df969df897847980722a234d9127718b01f369883d5fee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Security for fastapi-misskey 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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