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.4.tar.gz (13.1 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.4-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grambox-0.0.0.4.tar.gz
  • Upload date:
  • Size: 13.1 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.4.tar.gz
Algorithm Hash digest
SHA256 06744185c006060e2d1c964cebdc98efe35c3293cc7f9b27d1e2dfa4a7045a4a
MD5 3b746bdcd53f845281401e336767046f
BLAKE2b-256 8d5966ae200e95d58f811372f37a9993370276c37cc0fce8ddc3408d11e9dcfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grambox-0.0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7636099a92ca97eae1b3ce48ecf3e55f7e277d8905c632209cfdc60abbaadfb3
MD5 a0026fb396e193534c3160b0a7afac0d
BLAKE2b-256 f9db791b254bf08c6c778654c5d23d3d446cb2a2d8974581c965ef0515c23864

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