A fast, simple API for PCPartPicker.com.
Project description
pcpartpicker
This is an unofficial Python 3.7+ API for the website pcpartpicker.com. Written using async code and multiprocessing for efficient data retrieval. This package is currently in beta.
Installation:
pip install pcpartpicker
Examples:
Retrieving supported API regions:
from pcpartpicker import API
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):
from pcpartpicker import API
api = API()
print(api.region)
>>> us
Creating an API object with a different default region:
from pcpartpicker import API
api = API("de")
print(api.region)
>>> de
Changing the default region:
from pcpartpicker import API
api = API()
api.set_region("de")
print(api.region)
>>> de
Changing the maximum number of allowed concurrent requests:
from pcpartpicker import API
api = API()
api.set_concurrent_connections(100)
print(api.concurrent_connections)
>>> 100
Retrieving supported part list:
from pcpartpicker import API
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'}
Retrieving all part data:
from pcpartpicker import API
api = API()
part_data = api.retrieve_all()
Retrieving specific part data:
from pcpartpicker import API
api = API()
cpu_data = api.retrieve("cpu")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pcpartpicker-1.0.0.tar.gz
.
File metadata
- Download URL: pcpartpicker-1.0.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18588cf8960f2cbacb4abfabef2fefeb69a77493af742a5d219296b0ec1135c |
|
MD5 | 98372b691633f592419086ecf49a7f52 |
|
BLAKE2b-256 | 3cc2737f82c85b7f9170e804c074b447826988bf7185e167510757d914d36333 |
File details
Details for the file pcpartpicker-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pcpartpicker-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8fc158cf57ae639e78d35ec1006aa8aa719728afb6de913115f686544df65e |
|
MD5 | b317225d4fed7f56550e0d45f9e4c1a6 |
|
BLAKE2b-256 | 40e1a182aaf39283eddd491cc3e56f2f78a2f859ffdb58fac368a815ffd58122 |