Skip to main content

factordb-python

.github/workflows/test.yml PyPI PyPI PyPI PyPI Codecov

The FactorDB 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-pycli is to use pip:

$ pip install factordb-pycli

or, if you are not installing in a virtualenv:

$ sudo pip install factordb-pycli

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

$ pip install --upgrade factordb-pycli

Getting Started

CLI

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

$ factordb 16

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

$ factordb 16
2 2 2 2

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

$ 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

Metadata

Release files for factordb-python 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for factordb-python 1.3.0
File Size Uploaded Provenance
factordb-python-1.3.0.tar.gz 4.0 kB Without provenance Details

Release files / factordb-python-1.3.0.tar.gz

Download URL factordb-python-1.3.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9fd819633efef22d886ec61c57cbd45f7eba2b8f05716de9020909bebf1500e3
BLAKE2b-256 checksum
How to use checksums
90cddc940c17ba888ab4644ed3372e203bb6e651a8b976831bcff7afc3495a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Security for factordb-python 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page