Skip to main content

FixitPy is an uncomplicated Python library for interfacing with iFixit's API. Allowing repair guides to be programmatically retrieved.

Project description

FixitPy

GitHub PyPI - License PyPI Ko-fi Buy Me A Coffee Static Badge

FixitPy is an uncomplicated Python library for interfacing with iFixit's API.

Allowing repair guides to be programmatically retrieved.

Installation

pip install fixitpy

Usage

Guide retrieval

import fixitpy

# Call 'retrieve_guide' returns the guide's dictionary
found_guide = fixitpy.retrieve_guide(123)

# As any regular dictionary, you can retrieve specific values from it
print(f"Title: {found_guide.get("title")}")
print(f"Difficulty: {found_guide.get("difficulty")}")
print(f"Conclusion: {found_guide.get("conclusion")}")

# The dictionary returned from 'retrieve_guide' contains a list refered to as 'steps'
# Each list item contains a dictionary with the properties 'title', which is self explanatory and 'text', the process itself.
for step in found_guide.get("steps"):
    print(step.get("title"))
    print(step.get("text"))

Media retrieval

import fixitpy

# Call 'retrieve_media', returns the media's dictionary
found_guide = fixitpy.retrieve_media(123)

# As any regular dictionary, you can retrieve specific values from it
print(found_guide.get("width"))
print(found_guide.get("height"))

# The dictionary returned from 'retrieve_media' contains a sub-dictionary under 'sizes'
# Which contains all the sizes of the media and their corresponding URLs.
sizes = found_guide.get("sizes")

# 'thumbnail' is a very common size for iFixit Media
print(sizes.get("thumbnail"))

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.21.tar.gz (4.0 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.21-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fixitpy-0.2.21.tar.gz
  • Upload date:
  • Size: 4.0 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.21.tar.gz
Algorithm Hash digest
SHA256 a448569105520b4384cd03f0ed7f7259815fec5d6cec67f97a5be4924801634e
MD5 31ff3d38ec8bd201fadc71dc6d5ec818
BLAKE2b-256 ebcac8f506f7b5bb7bfac58daa95db7b55bbd98b67ccc818d3276fdb78060742

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fixitpy-0.2.21-py3-none-any.whl
  • Upload date:
  • Size: 4.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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 494a2f9ad3f5a4a2d0b9a42ee96aca047217806061f0de938a2bb3f06ae0ae40
MD5 ea018a6921f7266dba168f4c402b69a7
BLAKE2b-256 158644a94a99f2b79c906b01e628572d80887187aa5de4c53131b27fb5605083

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