All Projects → djetelina → pyArtifact

djetelina / pyArtifact

Licence: MIT license
Pythonic wrapper around Valve's Artifact API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyArtifact

nextcord
A Python wrapper for the Discord API forked from discord.py
Stars: ✭ 956 (+3724%)
Mutual labels:  api-wrapper
autopilot-api
A third-party JavaScript wrapper for Autopilot's REST API.
Stars: ✭ 14 (-44%)
Mutual labels:  api-wrapper
cryptox
Common API wrapper for multiple crypto currency exchanges
Stars: ✭ 50 (+100%)
Mutual labels:  api-wrapper
libopenTIDAL
TIDAL API interface written in ANSI C
Stars: ✭ 17 (-32%)
Mutual labels:  api-wrapper
NextBot
A Git-based fork of Valve's NextBot code.
Stars: ✭ 30 (+20%)
Mutual labels:  valve
harvesting
Ruby wrapper for the Harvest API v2
Stars: ✭ 24 (-4%)
Mutual labels:  api-wrapper
SwiftFlyer
An API wrapper for bitFlyer.
Stars: ✭ 39 (+56%)
Mutual labels:  api-wrapper
tplink-smartplug-api
TP-Link HS1xx smart plug API wrapper.
Stars: ✭ 48 (+92%)
Mutual labels:  api-wrapper
PowerSchool-API
A Node.js library for interacting with the PowerSchool SIS API.
Stars: ✭ 21 (-16%)
Mutual labels:  api-wrapper
webhl
WebHL is a fork of hlviewer.js that uses the File System Access API to load game assets direct from your computer rather than from a server.
Stars: ✭ 28 (+12%)
Mutual labels:  valve
TurnSignal
An anti-cable-twisting management utility for SteamVR.
Stars: ✭ 73 (+192%)
Mutual labels:  valve
pinboard.net
Fully featured API wrapper for pinboard.in
Stars: ✭ 21 (-16%)
Mutual labels:  api-wrapper
open route service
An encapsulation made around openrouteservice API for Dart and Flutter projects. Made for easy generation of Routes and Directions on Maps, Isochrones, Time-Distance Matrix, Pelias Geocoding, POIs, Elevation and routing Optimizations using their amazing API.
Stars: ✭ 20 (-20%)
Mutual labels:  api-wrapper
ChatLogger
ChatLogger is a Steam Tool based on the SteamKit2 library, designed to save your and friends messages! [Metro Theme]
Stars: ✭ 39 (+56%)
Mutual labels:  valve
sledge-formats
C# parsers and formats for Half-Life 1 and related engines.
Stars: ✭ 35 (+40%)
Mutual labels:  valve
vdf-parser
📜 Libraries to (de)serialize Valve's KeyValue format (VDF) in various languages
Stars: ✭ 70 (+180%)
Mutual labels:  valve
clash-api
Ruby wrapper for the Clash of Clans API
Stars: ✭ 14 (-44%)
Mutual labels:  api-wrapper
mixin bot
A simple API wrapper for Mixin Network in Ruby
Stars: ✭ 12 (-52%)
Mutual labels:  api-wrapper
covidtrackerapiwrapper
CovidSharp is a crossplatform C# API wrapper for the Coronavirus tracking API (https://github.com/ExpDev07/coronavirus-tracker-api)
Stars: ✭ 11 (-56%)
Mutual labels:  api-wrapper
pagespeedParseR
pagespeedParseR is an R wrapper for Google Pagespeed Insights API, that also enables convenient parsing
Stars: ✭ 20 (-20%)
Mutual labels:  api-wrapper

pyArtifact

Pythonic wrapper around Valve's Artifact API, with object mapping, filtering and hopefully more

Current phase: alpha -> feedback needed

MIT License pypi version Documentation Status Build Status

Here's what we can do so far

>>> from pyartifact import Cards
>>> cards = Cards()
>>> cards.load_all_sets()
>>> repr(cards.get('Storm Spirit').includes[0])
<Artifact card: {'id': 10538, 'base_id': 10538, 'name': 'Ball Lightning', 'type': 'Spell', 'text': "Move an <span style='font-weight:bold;color:#736e80;'>allied black hero</span> to an empty combat position in any lane.", 'mini_image': 'https://steamcdn-a.akamaihd.net/apps/583950/icons/set01/10538.aeb7a6a47e1d8b1a26307ae25e329df3e3bb0843.png', 'large_image': 'https://steamcdn-a.akamaihd.net/apps/583950/icons/set01/10538_large_english.9b39d2d2bb4769b68fa3ac42abee35b1685a57de.png', 'ingame_image': None, '_CardBase__references': [], 'color': 'black', 'rarity': None, 'item_def': None, 'mana_cost': 3, 'illustrator': 'JiHun Lee'}>

>>> filtered = cards.filter.type('Spell').mana_cost(gt=4).color('black').rarity('Rare')
>>> len(filtered)
1
>>> for card in filtered:
...     print(card)
...
The Cover of Night

# Deck encoding (wrapper not done)
>>> from pyartifact import decode_deck_string
>>> deck_contents = decode_deck_string('ADCJQUQI30zuwEYg2ABeF1Bu94BmWIBTEkLtAKlAZakAYmHh0JsdWUvUmVkIEV4YW1wbGU_')
>>> print(deck_contents['name'])
Blue/Red Example
>>> print(deck_contents['heroes'])
[{'id': 4003, 'turn': 1}, {'id': 10006, 'turn': 1}, {'id': 10030, 'turn': 1}, {'id': 10033, 'turn': 3}, {'id': 10065, 'turn': 2}]
>>> from pyartifact import encode_deck
>>> print(encode_deck(deck_contents))
ADCJQUQI30zuwEYg2ABeF1Bu94BmWIBTEkLtAKlAZakAYmHh0JsdWUvUmVkIEV4YW1wbGU_

Plans

  • Provide text sanitizers (text atm. has html) - to markdown, strip, etc., use for deck encoding/decoding
  • Add more filtering options
  • Cleanup code structure (possible performance improvements)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].