Skip to main content

API for PathOfBuilding's build sharing format.

Project description

Pre-release Software Warning

This library is currently in pre-release status and may change in the near future.
Meanwhile I am looking forward to community feedback to accommodate most use cases.
Pull requests are gladly accepted and much appreciated!

Introduction

Path Of Building API provides a comprehensive toolbox for processing Path of Building pastebins.
It is aimed at community developers:
  • looking to add Path of Building functionality to their apps.

  • upgrading from existing solutions.

As PoB pastebins became the standard way to share theorycrafting and characters,
community tools want to interact with them and users increasingly expect such functionality.

Benefits from using this library:

  • Focus on your app’s core competences

  • Spend your free time on unique features

  • Backwards-compatibility as PoB’s export format changes

  • Tested and secure codebase

Features

  • Look up and process:
    • Character stats (DPS, life, etc.)

    • Skill trees

    • Skills, skill groups and links

    • Gear and item sets

    • Path of Building configuration settings

    • Build author’s notes

  • Exposes all of Path of Building’s relevant stats and attributes in a simple and pythonic way.

  • Low memory footprint through slots and dynamically generated attributes.

  • Automatically calculates mod values on theorycrafted items.

  • Secure against XML attacks thanks to the defusedxml library.

Requirements

Setup Instructions

pip install pobapi

Setup Instructions For Developers

Setup virtual environment:

pip install virtualenv
cd my_project_folder
virtualenv venv

To activate on Microsoft Windows:

\venv\Scripts\activate

To activate on GNU/Linux:

source venv/bin/activate

Setup repository:

git clone https://github.com/ppoelzl/PathOfBuildingAPI.git
pip install -r requirements.txt

Basic Usage

>>> import pobapi
>>> url = "https://pastebin.com/bQRjfedq"
>>> build = pobapi.from_url(url)
>>> print(build.ascendancy_name)
Elementalist
>>> print(build.bandit)
None
>>> print(build.stats.life)
6911.
>>> if "Blade Vortex" or "Vaal Blade Vortex" == build.active_skill.name:
...     if "Storm Brand" in build.skill_names:
...         print(build.config.brand_attached)
...
True
>>> for item in build.items:
...    if item.name == "Inpulsa's Broken Heart":
...        print(item)
...        break
...
Rarity: Unique
Name: Inpulsa's Broken Heart
Base: Sadist Garb
Quality: 20
Sockets: (('G', 'G', 'G', 'B', 'B', 'B'),)
LevelReq: 68
ItemLvl: 71
+64 to maximum Life
26% increased Damage if you have Shocked an Enemy Recently
33% increased Effect of Shock
Shocked Enemies you Kill Explode, dealing 5% of
their Maximum Life as Lightning Damage which cannot Shock
Unaffected by Shock

Documentation

Available at Read the Docs.

Feedback

Please file a GitHub issue in this repository for any feedback you may have.

Contribution

Pull requests are gladly accepted. Check out the Developer Guide.

To-Do

  • Support enchantments

License

EUPL 1.2 (Think about it as an equivalent to LGPL + Affero clause).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pobapi-0.2.4.tar.gz (559.0 kB view details)

Uploaded Source

File details

Details for the file pobapi-0.2.4.tar.gz.

File metadata

  • Download URL: pobapi-0.2.4.tar.gz
  • Upload date:
  • Size: 559.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

File hashes

Hashes for pobapi-0.2.4.tar.gz
Algorithm Hash digest
SHA256 fd717741f4799fd231245e1d152b6f5ccdfbc58fcf6a0fd870748d6122b11b9a
MD5 6c924e130c09f0971cfdae30bf3f9725
BLAKE2b-256 f23fb2883e507276a44f15f95945073c210e3904f43c0c3f6dac7010d969a424

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page