Skip to main content

No project description provided

Project description

GramBox - Instagram Automation Toolkit

GramBox is a Python library designed for automating Instagram interactions using session-based login. It provides functions to send messages, post stories or images, follow/unfollow users, comment, and retrieve user data (public and private). Ideal for bot developers, automation systems, or scraping utilities. Lightweight, clean, and simple to use.


Installation

Install via pip:

pip install grambox

Quickstart

from grambox import GramBox, cookie, delete_session, userid, media_id

# Create a GramBox instance with login credentials
g = GramBox("USERNAME", "PASSWORD")

1. Direct Messaging

Send a plain text message

print(g.text_message("user_target", "Hello from GramBox!"))

Send a voice note (MP3 format)

print(g.voice_message("user_target", "voice.mp3"))

Send an image (JPG/PNG)

print(g.img_message("user_target", "photo.jpg"))

Send a video (MP4)

print(g.video_message("user_target", "video.mp4"))

2. Post Interactions

Like a post by URL

print(g.like("https://www.instagram.com/p/xxxxxx/"))

Comment on a post

print(g.comment("https://www.instagram.com/p/xxxxxx/", "Nice post!"))

3. Follow Management

Follow a user

print(g.follow("user_target"))

Unfollow a user

print(g.unfollow("user_target"))

4. Publishing Content

Post a short DM note

print(g.create_note("I'm online now!"))

Upload an Instagram Story (image)

print(g.story("story.jpg"))

Post a photo to your feed with a caption

print(g.post_img("post.jpg", "My latest post"))

5. Profile Editing

Edit profile information

print(g.edit_profile(
    new_username="new_user",
    new_full_name="Full Name",
    new_bio="Automated by GramBox"
))

Change your profile picture

print(g.edit_profile_img("avatar.jpg"))

6. Data Retrieval

Get private user info (requires login)

print(g.get_info_A("user_target"))

Get public user info (no login required)

print(g.get_info_B("user_target"))

Download a user's current story (requires login)

print(g.download_story("user_target"))

Download a user's public story without login

print(g.download_story_b("user_target"))

Download all media from a post, reel, or carousel

print(g.download_posts("https://www.instagram.com/p/xxxxxx/"))

7. Inbox & Messages

Retrieve the latest message from your DM inbox

print(g.get_messages())

Retrieve the most recent message request

print(g.get_inbox_request())

8. Utility Functions (outside the class)

Get or create a session (returns cookies)

print(cookie("USERNAME", "PASSWORD"))

Delete a stored session file

print(delete_session("USERNAME"))

Get the numeric user ID for a username

print(userid("USERNAME", "PASSWORD", "user_target"))

Get the media ID of a post by URL

print(media_id("https://www.instagram.com/p/xxxxxx/"))

Note: Use this library responsibly and do not violate Instagram's terms of service.

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

grambox-0.0.0.5.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

grambox-0.0.0.5-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file grambox-0.0.0.5.tar.gz.

File metadata

  • Download URL: grambox-0.0.0.5.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for grambox-0.0.0.5.tar.gz
Algorithm Hash digest
SHA256 e1967971a0417bc5684a9a4c5840b6f820830bf93240345b4cbc6baba9211959
MD5 a891ea2a5620d1f9b2368639a32d4df9
BLAKE2b-256 c5113466313b1fe668f3894931bde90ddd86a206e03d444f3169f2d4253561ed

See more details on using hashes here.

File details

Details for the file grambox-0.0.0.5-py3-none-any.whl.

File metadata

  • Download URL: grambox-0.0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for grambox-0.0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a44b93654160b754e5918b723eebdbfbf1dd69b8492b35df988f3041c1a52e06
MD5 a77f5a6e328c274fc49cbaad7ab6b3f8
BLAKE2b-256 bb90b62f7ced3452663424864ac8aa1a39e63e82bbeebc679dbdcea0ab28834d

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