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.9.2.tar.gz
(11.6 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.9.2.tar.gz.
File metadata
- Download URL: tarkov-market.py-0.9.2.tar.gz
- Upload date:
- Size: 11.6 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 |
75c83fbf9bdf32b9f8c9b86cb244ef50f36b7340b3a8025d8212a4dccc3ee09d
|
|
| MD5 |
fbc8dfb50207e906d5ee19a8b822d120
|
|
| BLAKE2b-256 |
b724e5c5631235ecc5edca4524c7bf5736b85f0471cdea16a9f50eada300aaca
|
File details
Details for the file tarkov_market.py-0.9.2-py3-none-any.whl.
File metadata
- Download URL: tarkov_market.py-0.9.2-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 |
0836fdbb81aeceada4d98f6948869b2b6f2d21d1d0dcf2373c92a5237d524c41
|
|
| MD5 |
f6a28be36468912174147bfada38cf1e
|
|
| BLAKE2b-256 |
a3cf1963ab0e57099d019948b50df4a5a769c365881a1d960f80a208cccdbb97
|