async API wrapper for Tarkov Market written in Python.
Project description
async API wrapper for Tarkov Market written in Python. It is designed to reverse discord.py as a base.
What is Tarkov-Market.py?
Tarkov-Market.py is Modern Python API using async and await.
Installing
Python 3.8 or higher is required
# Linux/macOS
python3 -m pip install -U tarkov-market.py
# Windows
py -3 -m pip install -U tarkov-market.py
Quick Example
import asyncio
import tarkov_market
from typing import List
market = tarkov_market.Client(token='INSERT YOUR API KEY.')
async def main():
# Must run setup once before use.
await market.setup()
# Find Item and return Items from pre-loaded Item List. It's Unlimited.
item: List[tarkov_market.Item] = market.find_items('TerraGroup Labs keycard (Red)')
return item
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
Fetch Example
import asyncio
import tarkov_market
from typing import List
market = tarkov_market.Client(token='INSERT YOUR API KEY.')
async def main():
# Must run setup once before use.
await market.setup()
# fetch the latest data from tarkov-market.
# there is a limit of 300 requests per minute to fetch.
# return the first data item from the request result.
item: tarkov_market.Item = await market.fetch_item('TerraGroup Labs keycard (Red)')
# return the items from the request results.
items: List[tarkov_market.Item] = await market.fetch_items('keycard')
return item
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
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
tarkov-market.py-0.8.1.tar.gz
(11.5 kB
view details)
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 tarkov-market.py-0.8.1.tar.gz.
File metadata
- Download URL: tarkov-market.py-0.8.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040d43726bbbdb619022554ad49d2bf4ec11c780e210f41a40d62717dcdf0405
|
|
| MD5 |
2f744119f221f5949a65799afc021190
|
|
| BLAKE2b-256 |
5441cc0fc974dfb7b0583a809f91c62c19624990a4546c32f441500a73eacb4b
|
File details
Details for the file tarkov_market.py-0.8.1-py3-none-any.whl.
File metadata
- Download URL: tarkov_market.py-0.8.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d828fba33ac1dcd179d433c6d0b091a685b11f4925e5edd4bc6daa56384485c
|
|
| MD5 |
91001f28babc27b73b2939eb8ec9962e
|
|
| BLAKE2b-256 |
19c8ef489011a4e1256320f76e12439c5fdcae500b7691a285e9e7c954584431
|