Skip to main content

A small example package

Project description

Metadata-Version: 2.4 Name: grambox Version: 0.0.0.2 Summary: A small example package Author-email: HUSSEIN HAFEDH OBAID husseun.selt@gmail.com License-Expression: MIT Project-URL: Homepage, https://github.com/h98m/grambox Project-URL: Issues, https://github.com/h98m/grambox/issues Classifier: Programming Language :: Python :: 3 Classifier: Operating System :: OS Independent Requires-Python: >=3.7 Description-Content-Type: text/markdown License-File: LICENSE Dynamic: license-file

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: grambox-0.0.0.3.tar.gz
  • Upload date:
  • Size: 13.2 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.3.tar.gz
Algorithm Hash digest
SHA256 f99a6bb46894e63390a93fd0230bbec0221bc21e6a90d6e265c8e5d7bd5fd8b0
MD5 f4aa2e2ebf2d304a7ea9c7ed5f114430
BLAKE2b-256 e8050421888b6220005bd500ea645303c5669962618cde27de5f60f742b44412

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grambox-0.0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 70d0c71f2f3828aeb691c97a8bd4d5a51011e9be49680b50fbbcf1a0671a8230
MD5 e764eea1e2aa0278d0440dad9cb385c2
BLAKE2b-256 935f1e781156bbc4e0ee5af3fdc499486c25b9463b4bc20c4ab6c58cafbb5dc3

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