Skip to main content

iFixit REST API Interface

Project description

fixitPy

GitHub PyPI - License Ko-fi PyPI

Python iFixit API interface.

Currently, you can retrieve guides and their prerequisite guides

Installation

To install fixitPy

pip install fixitpy

Using the library

Retrieving a guide without prerequisites

This returns a dict that contains information pertaining to the guide

import fixitpy

found_guide = fixitpy.retrieve_guide(123) # call the retrieve_guide function which returns a dict

print(found_guide.get("title"))
print(found_guide.get("difficulty"))

Retrieving a guide with prerequisites

A prerequisite is an optional guide that the retrieved guide recommends you start with before. The prerequisite guide is the same dict structure of what returns from fixitpy.retrieve_guide

import fixitpy

found_guide = fixitpy.retrieve_guide(123, get_prerequisites=True) # call the retrieve_guide function which returns a dict

print(found_guide.get("title"))
print(found_guide.get("difficulty"))

first_prerequisite = found_guide.get("prerequisites")[0]
print(first_prerequisite.get("title"))

Getting Guide Steps

What makes a repair guide, a guide is the inclusion of steps to follow.

import fixitpy

found_guide = fixitpy.retrieve_guide(123, get_prerequisites=True) # call the retrieve_guide function which returns a dict

print(found_guide.get("title"))
print(found_guide.get("difficulty"))

for step in found_guide.get("steps"):
    print(step.get("title")) # this is the title of each step
    print(step.get("steps")) # this is a list of each sentence of the current step

License

MIT License

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

fixitpy-0.2.15.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fixitpy-0.2.15-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file fixitpy-0.2.15.tar.gz.

File metadata

  • Download URL: fixitpy-0.2.15.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fixitpy-0.2.15.tar.gz
Algorithm Hash digest
SHA256 a34b48d32102e4a57829838b7bc78980b609ebd5beb49c7d9824555a3a798246
MD5 70c9dbab9480db3bcbb75beb7a9f2d50
BLAKE2b-256 2fab1cfe57fef9a3f011613ecd891c5b8aa3dd8b9cadfe3a2fde03056a1397e7

See more details on using hashes here.

File details

Details for the file fixitpy-0.2.15-py3-none-any.whl.

File metadata

  • Download URL: fixitpy-0.2.15-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fixitpy-0.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 8d64c9f02bec3435b8cbbda17228081f670e5de42b70ba566e718165c260e699
MD5 33bf6d4873f168a1f69e16094927bfa4
BLAKE2b-256 976ba5f8d0fe4ab12a9e20d1657c9d287317c1837997b864ede36c9dc7e5d162

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