Python API for querying and browsing mercari.jp
Project description
mercapi
What is Mercapi?
Mercapi is a Python wrapper for mercari.jp API. It's capable of producing HTTP requests implementing security mechanisms employed in native mercari.jp web app. Requests and responses are mapped to custom classes with type-hinting and documentation.
Quickstart
First, install the mercapi package using the package manager of your choice.
As an example, we want to run the search query sharpnel.
from mercapi import Mercapi
m = Mercapi()
results = await m.search('sharpnel')
print(f'Found {results.meta.num_found} results')
for item in results.items:
print(f'Name: {item.name}\\nPrice: {item.price}\\n')
We can use a single result object to retrieve full details of the listing.
item = results.items[0]
full_item = await item.full_item()
print(full_item.description)
Or get it directly using an ID.
item = await m.item('m90925725213')
print(item.description)
Refer to mercapi.mercapi.Mercapi documentation for all implemented features.
Examples above are not executable. If you want to try them out, run python example.py.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mercapi-0.4.2.tar.gz.
File metadata
- Download URL: mercapi-0.4.2.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2d51f2caaba2082ab073b398c7188dd456d9d0d183a86acf812ded174feee9
|
|
| MD5 |
a375fbf5d6ab9c5b1afe0e328f6c9461
|
|
| BLAKE2b-256 |
4e47e0b2ce0d819d0edfcbba56cf97667fd7ea4fc1d51a6d771aab3f15c322a9
|
Provenance
The following attestation bundles were made for mercapi-0.4.2.tar.gz:
Publisher:
release.yaml on take-kun/mercapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mercapi-0.4.2.tar.gz -
Subject digest:
0b2d51f2caaba2082ab073b398c7188dd456d9d0d183a86acf812ded174feee9 - Sigstore transparency entry: 148003114
- Sigstore integration time:
-
Permalink:
take-kun/mercapi@bbf56782a593254338e7ed7eb019a2cb14f5ba9f -
Branch / Tag:
refs/heads/release/v0.4.2 - Owner: https://github.com/take-kun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@bbf56782a593254338e7ed7eb019a2cb14f5ba9f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mercapi-0.4.2-py3-none-any.whl.
File metadata
- Download URL: mercapi-0.4.2-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e55ca4470e464faddcc05cf6e935d50bfe2c261de38ba3370fe8605c953ee7dc
|
|
| MD5 |
f8eb0bb72f9c2721f7735cfdf9f7057e
|
|
| BLAKE2b-256 |
2622aaece71efdbe854e72178641c3cceff63e11396205ede356c757cdbd6c1e
|
Provenance
The following attestation bundles were made for mercapi-0.4.2-py3-none-any.whl:
Publisher:
release.yaml on take-kun/mercapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mercapi-0.4.2-py3-none-any.whl -
Subject digest:
e55ca4470e464faddcc05cf6e935d50bfe2c261de38ba3370fe8605c953ee7dc - Sigstore transparency entry: 148003116
- Sigstore integration time:
-
Permalink:
take-kun/mercapi@bbf56782a593254338e7ed7eb019a2cb14f5ba9f -
Branch / Tag:
refs/heads/release/v0.4.2 - Owner: https://github.com/take-kun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@bbf56782a593254338e7ed7eb019a2cb14f5ba9f -
Trigger Event:
workflow_dispatch
-
Statement type: