Metadata-Version: 2.1
Name: idservice
Version: 1.2.3
Summary: Distributed ID generator microservice based on FastAPI
Home-page: https://github.com/tommyxu/idservice
License: MIT
Author: Xu Yijun
Author-email: xuyijun@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Requires-Dist: configprops (>=1.4.0,<2.0.0)
Requires-Dist: fastapi (>=0.63.0,<0.64.0)
Requires-Dist: uvicorn[standard] (>=0.13.4,<0.14.0)
Project-URL: Repository, https://github.com/tommyxu/idservice
Description-Content-Type: text/markdown

# idservice

`ID-Service` is a distributed ID generator microservice based on FastAPI.

## Installation

```sh
pip3 install idservice
```

## Start Service

```sh
idservice-start
```

> List all available `uvicorn` options by `idservice-start --help`

## API Endpoint

Several endpoints:

-   `/api/snowflake`
-   `/api/random/64`
-   `/api/uuid`

Browse `/docs` (default to http://localhost:8000/docs) to read all APIs.

## Configuration

Environment variable:

| Environment Vars                  | Usage                          | Default |
| --------------------------------- | ------------------------------ | ------- |
| `ID_SERVICE_SNOWFLAKE_MACHINE_ID` | Snowflake Machine ID (10 bits) | Random  |

