Skip to main content

pcpartpicker

Build Status Coverage Status

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)

Source distribution for pcpartpicker 2.2.2
File Size Uploaded
pcpartpicker-2.2.2.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pcpartpicker 2.2.2
File Interpreter ABI Platform
pcpartpicker-2.2.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

2.2.2 This release

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

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