Skip to content

A small and fun API for virtual dice rolling needs 🎲

License

Notifications You must be signed in to change notification settings

lalugue/dice-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dice-api

A small and fun API for virtual dice rolling needs 🎲

For a sample roll, try the following locally:

http://127.0.0.1:8000/dice/

To roll one's own set of dice, use the dice query parameter, for example:

http://127.0.0.1:8000/dice/?dice=d4,d6,d6

Valid dice include:

d4,d6,d8,d10,d12,d20

Installation

Install the required libraries whether in the host itself or in a virtual machine:

pip install -r requirements.txt

Run

Run the application with the following command:

uvicorn main:app --reload

To run without reloading after code changes, remove the --reload option

Documentation

Auto-generated and interactive list of available routes is located at /docs, for example:

http://127.0.0.1:8000/docs

Test

Run pytest to run tests

pytest

About

A small and fun API for virtual dice rolling needs 🎲

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages