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
pcpartpicker-1.0.0.tar.gz
(13.8 kB
view hashes)
Built Distribution
Close
Hashes for pcpartpicker-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8fc158cf57ae639e78d35ec1006aa8aa719728afb6de913115f686544df65e |
|
MD5 | b317225d4fed7f56550e0d45f9e4c1a6 |
|
BLAKE2b-256 | 40e1a182aaf39283eddd491cc3e56f2f78a2f859ffdb58fac368a815ffd58122 |