Skip to main content

Python client for https://boxapi.ir to crawl and read Instagram data.

Project description

BoxAPI Python

A Python client for interacting with the Box API for Instagram. This library wraps multiple Instagram endpoints including user information, media retrieval, and direct messages, allowing you to easily integrate Instagram functionality into your Python applications.

Disclaimer
This project is currently in a developer preview state and may not be ready for production use. A stable version is expected to be released within the next couple of weeks. Use at your own risk and feel free to report any issues you encounter.

Table of Contents

Features

  • Modular Design: Separate sub-clients for general Instagram endpoints and direct message (DM) endpoints.
  • Easy Integration: Instantiate a single client to access the full functionality of the Box API.
  • Flexible Usage: Use DM endpoints only when needed—save overhead if your application doesn’t require them.
  • Extensible: Add additional endpoints or support for other platforms with minimal changes.

Installation

You can install the package via pip or Poetry.

Using pip

pip install boxapi

Using Poetry

poetry add boxapi

Usage

General Instagram API

from boxapi import BoxApiClient

# Initialize BoxApiClient with Box API credentials
# IMPORTANT: MAKE SURE YOU ARE READING YOUR USERNAME AND PASSWORD FROM ENVIRONMENT VARIABLES
box_client = BoxApiClient("your_boxapi_username", "your_boxapi_password")

# Use the Instagram sub-client for general endpoints
user_info = box_client.instagram.get_user_info("leomessi")

print(user_info)

Direct Messages

Direct Message functionality is available through a separate sub-client. Instantiate it when needed:

from boxapi import BoxApiClient

# Initialize BoxApiClient with Box API credentials
box_client = BoxApiClient("your_boxapi_username", "your_boxapi_password")

# Use DM endpoints by providing the Instagram account credentials per call
login_response = box_client.instagram_dm.direct_login("insta_username", "insta_password")
print(login_response)

Examples

Check out the examples folder for complete scripts demonstrating how to use the different features of this library (It's a work in progress).

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

boxapi-1.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

boxapi-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file boxapi-1.0.0.tar.gz.

File metadata

  • Download URL: boxapi-1.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.12.7-arch1-1.1-g14

File hashes

Hashes for boxapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cb2be02bab5c180a1e61d48c78403a7be476cff0f68106344328cb67fcc4143d
MD5 4070df06a6c3843c0b8cf5a03bef7c76
BLAKE2b-256 9459fa38532f9d4b74002af4ca9b1d52dae077498674f5119a2326e85123ae69

See more details on using hashes here.

File details

Details for the file boxapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: boxapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.12.7-arch1-1.1-g14

File hashes

Hashes for boxapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df865a26ac44c2097adf24413c9bc513ed19cf8dcf962d3aee16fdc70c8da73b
MD5 96a49273bf7dfb1e8c0581dd3a70c18b
BLAKE2b-256 24844ed1ef2cf339ac0aa7ae0598477a98b7d7ae5b42f480f84dc9cbc42d6b9a

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