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.5.0.tar.gz
(11.3 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.5.0.tar.gz.
File metadata
- Download URL: tarkov-market.py-0.5.0.tar.gz
- Upload date:
- Size: 11.3 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 |
3712d160c1d4e9cbd23640370d64deff43ebd9f9e5ca9022e404ad8942e00f3b
|
|
| MD5 |
1b42856f707ed769949df43910c9fb7d
|
|
| BLAKE2b-256 |
6f06c10db8c0cdea8842f8abf88399fb5ddc48c0b8f0a0b047a9473db6e12b74
|
File details
Details for the file tarkov_market.py-0.5.0-py3-none-any.whl.
File metadata
- Download URL: tarkov_market.py-0.5.0-py3-none-any.whl
- Upload date:
- Size: 13.3 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 |
127d979b094c47d53bf4df5f04fdefe262b71b6799d841cf592de0049eb0fd53
|
|
| MD5 |
f068f060d86fd9456f8136f714527000
|
|
| BLAKE2b-256 |
f6c6080660e5d5efa12eee7f95eb49f3bb315900baf360acfe357b9811ca106d
|