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) # 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.16.tar.gz (3.4 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.16-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fixitpy-0.2.16.tar.gz
  • Upload date:
  • Size: 3.4 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.16.tar.gz
Algorithm Hash digest
SHA256 18de39860d8c29859c523a9c027470bac1f85675646e25d13b8bdc48b242d49e
MD5 b07492980065966087765c250a1f30b8
BLAKE2b-256 8928d506f50a7918a57d47848782297ccd2582ddb17eb1fcf15c195b17032b54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fixitpy-0.2.16-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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 12fcf4eb7f482fcbb37eb97fa597b6041373f026e6a90e75682e3d8021db7bc1
MD5 f1fb26711f4ba59a037d2fd42c7cd84f
BLAKE2b-256 87559d922a547412dc42a15ce0f57b83e1948f376a3ab93e417feec3085ba038

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