python RPG Dice Parser and calculator
Project description
#pydiecalc
[![Build Status](https://travis-ci.org/roaet/pydiecalc.svg?branch=master)](https://travis-ci.org/roaet/pydiecalc)
##Installation
`pip install pydiecalc`
##Usage
###As a CLI
To run the pydiecalc library as an interactive CLI you run the application
without arguments:
`pydiecalc`
###From the Command Line
To run the pydiecalc library from the command line you run the application with
arguments that will be parsed:
`pydiecalc 1d6 + 10`
###As a library
To use pydiecalc as a library you need to import it and then handle the output:
```
import pydiecalc
result, rolls = pydiecalc.roll('1d6 + 10')
```
`pydiecalc.roll` will raise `CaughtRollParsingError` if the parsing fails.
[![Build Status](https://travis-ci.org/roaet/pydiecalc.svg?branch=master)](https://travis-ci.org/roaet/pydiecalc)
##Installation
`pip install pydiecalc`
##Usage
###As a CLI
To run the pydiecalc library as an interactive CLI you run the application
without arguments:
`pydiecalc`
###From the Command Line
To run the pydiecalc library from the command line you run the application with
arguments that will be parsed:
`pydiecalc 1d6 + 10`
###As a library
To use pydiecalc as a library you need to import it and then handle the output:
```
import pydiecalc
result, rolls = pydiecalc.roll('1d6 + 10')
```
`pydiecalc.roll` will raise `CaughtRollParsingError` if the parsing fails.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydiecalc-0.1.3.tar.gz
(4.3 kB
view details)
File details
Details for the file pydiecalc-0.1.3.tar.gz
.
File metadata
- Download URL: pydiecalc-0.1.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e70bef1dc51cce9badbfbf897d6c747c289ed6959a7e373504921743521a0200 |
|
MD5 | d42d2fc476e6fe526c19146f5bb4c258 |
|
BLAKE2b-256 | c31e776336edfd5ac694093e3438b40a3e4e0007122819250619a7426efd0fb8 |