Metadata-Version: 2.1
Name: fastapi-simple-bearer
Version: 0.1.1
Summary: The simpliest way to secure your API with preset token
Author: Yan Khachko
Author-email: a@slnk.icu
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: fastapi (>=0.115.0,<0.116.0)
Project-URL: Source, https://github.com/sijokun/async-fastapi-jwt-auth
Description-Content-Type: text/markdown

# FastAPI Simple Bearer (FSB)
This library provides you with ability to secure your endpoints with preset token (or tokens) in the "Authorization: Bearer" header

## Installation

The easiest way to start working with this library is to install it from pip

`pip install fastapi-simple-bearer`

## Example of usage
Basic usage:
```python
from fastapi import Depends, FastAPI
from fastapi_simple_bearer import FSB, FSBToken

app = FastAPI()

fsb = FSB(token="SUPER_SECRET_TOKEN")

@app.get("/secure")
async def secure(auth: FSBToken = Depends(fsb)):
    return {"token": auth.token}

```
Other examples are available in [examples](examples) folder
