pitchfork-api
An unofficial python API for pitchfork.com reviews.
Build Status |
Version |
Python Versions |
|---|---|---|
Apologies for the confusing naming - pypi doesn’t allow the use of underscores in package names, while python doesn’t allow dashes in module names. As a result, the package name is pitchfork-api, but it is pitchfork_api everywhere else.
Installation
You can get it from python package index:
pip install pitchfork-api
You can also clone the repository, but note that pitchfork depends on beautifulsoup4 for HTML parsing so you first have to install beautifulsoup4 yourself !!!
git clone https://github.com/tejassharma96/pitchfork_api
Usage
>> import pitchfork
>> p = pitchfork.search('kanye west', 'my beautiful') # the title is autocompleted
>> p.album() # the full album title
u'My Beautiful Dark Twisted Fantasy'
>> p.label()
u'Def Jam / Roc-A-Fella'
>> p.editorial()[:100] # get the first 100 characters of the review.
u"Kanye West's 35-minute super-video,\xa0Runaway, peaks with a parade. Fireworks flash while red hoods ma"
# the link to the album cover image
>> p.cover()
'http://cdn4.pitchfork.com/albums/15935/homepage_large.831179e9.jpg'
>> p.score()
10.0
# to check what methods are available, you can use 'methods()'
>> p.methods()
score()
abstract()
editorial()
full_text()
cover()
artist()
album()
label()
year()
Tests
You can run the basic tests located in the tests directory with:
$ cd pitchfork
$ python3 -m unittest discover
License
MIT
Contributions
If you want to add some new feature, suggest improvement or whatnot you’re welcome to message me or send a pull request!
Metadata
Release files for pitchfork-api 0.0.4
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 |
|---|---|---|---|---|
| pitchfork_api-0.0.4.tar.gz | 6.5 kB | Without provenance | Details for pitchfork_api-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pitchfork_api-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pitchfork_api-0.0.4-py3-none-any.whl |
Total release size: 16.7 kB
Release files / pitchfork_api-0.0.4.tar.gz
| Download URL | pitchfork_api-0.0.4.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
221021dde465e7faf53ea868b155dc3536d8c1b1e5a18b15e3d332f087607af3
|
|
BLAKE2b-256 checksum How to use checksums |
c080266d50439b24c93502dc942f496f6517d82049c39e604cca56aae2ded7b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2
|
Release files / pitchfork_api-0.0.4-py3-none-any.whl
| Download URL | pitchfork_api-0.0.4-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
207dd1b562fbea8b7af3743aa70e4b44b43fc9bcb7e876462b62d87fca3019fc
|
|
BLAKE2b-256 checksum How to use checksums |
25d99a2a8f26a3d9994e9e3334d425b3cf40719c6080970e122781b84d208ea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2
|
Security for pitchfork-api 0.0.4
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.