pcpartpicker
This is an unofficial Python 3.7+ API for the website pcpartpicker.com. It is written using asynchronous requests for efficient data retrieval. This package is currently in a stable beta.
Installation:
Package retrieval and installation can be easily accomplished through pip.
pip install pcpartpicker
Examples:
In order to use the API, simply import API from the pcpartpicker package.
from pcpartpicker import API
You can then instantiate the API class and use it to make requests.
api = API()
cpu_data = api.retrieve("cpu")
all_data = api.retrieve_all()
api.retrieve() and api.retrieve_all() methods both return a PartData instance, which contains a timestamp and a to_json() method.
A list of supported parts can be obtained in the following manner:
api = API()
print(api.supported_parts)
>>> {'wireless-network-card', 'case-fan', 'cpu', 'cpu-cooler', 'headphones', 'motherboard', 'monitor', 'internal-hard-drive', 'external-hard-drive', 'ups', 'fan-controller', 'case', 'keyboard', 'mouse', 'wired-network-card', 'sound-card', 'video-card', 'speakers', 'optical-drive', 'power-supply', 'thermal-paste', 'memory'}
There are also a number of methods that can be used in order to customize the API behavior. For example, you can change the region, determine the number of concurrent, asynchronous connections that can be made, and can also set whether or not the API can use multiple threads.
Retrieving supported API regions:
api = API()
print(api.supported_regions)
>>> {'be', 'us', 'it', 'uk', 'ie', 'nz', 'de', 'ca', 'au', 'fr', 'se', 'es', 'in'}
Retrieving currently selected region (default is US):
api = API()
print(api.region)
>>> us
Creating an API object with a different default region:
api = API("de")
print(api.region)
>>> de
Changing the default region:
api = API()
api.set_region("de")
print(api.region)
>>> de
Metadata
Release files for pcpartpicker 2.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pcpartpicker-2.2.2.tar.gz | 10.1 kB | Without provenance | Details for pcpartpicker-2.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pcpartpicker-2.2.2-py3-none-any.whl | Python 3 | none | any | Details for pcpartpicker-2.2.2-py3-none-any.whl |
Total release size: 33.4 kB
Release files / pcpartpicker-2.2.2.tar.gz
| Download URL | pcpartpicker-2.2.2.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c7561329e6c082104f7f1eef43f90ec62251461cfcbe6040228b026a68c2ca0
|
|
BLAKE2b-256 checksum How to use checksums |
1efebb7bd1139bea09786fa1e21f2e2365a216a3cc023342ccd88965a094a49d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
|
Release files / pcpartpicker-2.2.2-py3-none-any.whl
| Download URL | pcpartpicker-2.2.2-py3-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10ec5b4200b347abd65c97501f9ac7bb16ffd701e4bffdba276ebacf3782e185
|
|
BLAKE2b-256 checksum How to use checksums |
4539a26e90285958ff3747ba2f67b9cbd18402f532e1b4134264dc7d26ea0398
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
|
Security for pcpartpicker 2.2.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.