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
loop = asyncio.get_event_loop()
market = tarkov_market.Client(token='INSERT YOUR API KEY.', refresh_rate=None)
async def main():
# Find Item and return Items from pre-loaded Item List. It's Unlimited.
items: List[tarkov_market.Item] = market.find_items('keycard')
# Get Item by name. Can get it through uid and bsg_id.
item: tarkov_market.Item
item = market.get_item('Tactical glasses')
item = market.get_item(bsg_id='BSG_ID')
item = market.get_item(uid='UID')
if __name__ == '__main__':
market.start()
loop.run_until_complete(main())
loop.close()
Fetch Example
import asyncio
import tarkov_market
from typing import List
loop = asyncio.get_event_loop()
market = tarkov_market.Client(token='INSERT YOUR API KEY.', loop=loop)
async def main():
# 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.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.11.0.tar.gz
(10.7 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.11.0.tar.gz.
File metadata
- Download URL: tarkov-market.py-0.11.0.tar.gz
- Upload date:
- Size: 10.7 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 |
9e420d5d2828cf7de2a490dd5024ee0bd90a77fa236901d213293977d422e7b5
|
|
| MD5 |
945fbdee0edbd9be15d0a8e72c84aefc
|
|
| BLAKE2b-256 |
c5ecdd58e277cfe9b216fb3219fa5870dcb56fb025906264b52d6deb29bdfa8f
|
File details
Details for the file tarkov_market.py-0.11.0-py3-none-any.whl.
File metadata
- Download URL: tarkov_market.py-0.11.0-py3-none-any.whl
- Upload date:
- Size: 12.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 |
e538ac9abb0fb8696c976b9be7099ae8d77c068d99617fc8bfa186ec4cd24869
|
|
| MD5 |
5eb667405f13d4aa4de9e5b861c6d004
|
|
| BLAKE2b-256 |
eecdd586be48e3df1e00324e1e37bbb694ab488efda83cd958c6683512cfcc9f
|