Metadata-Version: 2.4
Name: factordb-python
Version: 1.3.0
Summary: The FactorDB client library with Python
Home-page: https://github.com/ryosan-470/factordb-python
Author: Ryosuke SATO (@ryosan-470)
Author-email: rskjtwp@gmail.com
License: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# factordb-python
![.github/workflows/test.yml](https://github.com/ryosan-470/factordb-python/workflows/.github/workflows/test.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/l/factordb-python.svg?style=flat-square)](./LICENSE.md)
[![PyPI](https://img.shields.io/pypi/pyversions/factordb-python.svg?style=flat-square)](https://pypi.python.org/pypi/factordb-python)
[![PyPI](https://img.shields.io/pypi/status/factordb-python.svg?style=flat-square)](https://pypi.python.org/pypi/factordb-python)
[![PyPI](https://img.shields.io/pypi/v/factordb-python.svg?style=flat-square)](https://pypi.python.org/pypi/factordb-python)

The [FactorDB](https://factordb.com) is the database to store known factorizations for any number.
This tool can use on your command line.
And also you can use this tool with python 2 & 3 scripts.

## Installation
The easiest way to install factordb-python is to use [pip](http://www.pip-installer.org/en/latest/):

```bash
$ pip install factordb-python
```

or, if you are not installing in a `virtualenv`:

```bash
$ sudo pip install factordb-python
```

If you have the factordb-python installed and want to upgrade to the latest version you can run:

```bash
$ pip install --upgrade factordb-python
```

## Getting Started

### CLI
If you want to know the result of factorization of 16, you should type like this:

```bash
$ factordb 16
```

Then, you can get the answer from factordb.com.

```bash
$ factordb 16
2 2 2 2
```

If you want to know more detail of result, you can get an answer of JSON format.

```bash
$ factordb --json 16
{"id": "http://factordb.com/?id=2", "status": "FF", "factors": [2, 2, 2, 2]}
```

### Library usage
If you want to use this script with Python, you should type `import` statement on your code like this:

```
from factordb.factordb import FactorDB
```

Then, you can get the answer with Python lists.

```
In [1]: from factordb.factordb import FactorDB

In [2]: f = FactorDB(16)

In [3]: f.get_factor_list()
Out[3]: []

In [4]: f.connect()
Out[4]: <Response [200]>

In [5]: f.get_factor_list()
Out[5]: [2, 2, 2, 2]

In [6]: f.get_factor_from_api()
Out[6]: [['2', 4]]

In [7]: f.get_status()
Out[7]: 'FF'
```

# License
MIT
