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.7.0.tar.gz
(11.4 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.7.0.tar.gz.
File metadata
- Download URL: tarkov-market.py-0.7.0.tar.gz
- Upload date:
- Size: 11.4 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 |
00467c5f35fc3c3565f6bb8d671604e2f5565796ea2e47c8c6d35cb26f0e836e
|
|
| MD5 |
778b342088f4fea86acd1034a8fc5437
|
|
| BLAKE2b-256 |
50134e3f9201063013a1cc3df46b4e968b258d75c837214b9ba32099e776d22f
|
File details
Details for the file tarkov_market.py-0.7.0-py3-none-any.whl.
File metadata
- Download URL: tarkov_market.py-0.7.0-py3-none-any.whl
- Upload date:
- Size: 13.4 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 |
2b7883b8c126601e2f773936b660489b0d3022e06b3f0bb1c3ea65d9ffb7c9c0
|
|
| MD5 |
7f51b2883d23aedaf04ff034b180d044
|
|
| BLAKE2b-256 |
e8b9fac421002abc31f7f36e2649285c0d571f4aa781f07d9a5137851194d47b
|