pinsta


Namepinsta JSON
Version 3.0 PyPI version JSON
download
home_pagehttps://github.com/diezo/pinsta
Summary🔥 Fastest & Simplest Python Package For Instagram Automation
upload_time2023-06-27 13:34:26
maintainer
docs_urlNone
authorDeepak Soni
requires_python
licenseMIT
keywords instagram-client instagram api-wrapper instagram-scraper instagram-api instagram-sdk instagram-photos instagram-api-python instabot instagram-stories instagram-bot instapy instagram-downloader instagram-account instagram-crawler instagram-private-api igtv instagram-automation reels instagram-feed
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🤖 Pinsta - Simple Instagram API
[![PyPI](https://img.shields.io/pypi/v/pinsta)](https://pypi.org/project/pinsta)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pinsta)]()
[![Downloads](https://static.pepy.tech/badge/pinsta)](https://pepy.tech/project/pinsta)
[![Twitter Share](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fpinsta)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fpinsta)

<img style="border-radius: 10px" src="https://imgtr.ee/images/2023/06/14/Twfd4.png"/>

This package lets you use Instagram's Internal Web API through simple functions and classes. Pinsta uses Instagram's Original Web API to scrape data which makes it a reliable choice over other third-party scrapers. This library mainly focuses on Simplicity & Reliability.

Two type of classes are supported - ***Guest & Host***.

[<img style="margin-top: 10px" src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" width="160"/>](https://buymeacoffee.com/diezo)

## 📢 Announcements
**[#02]** [AutoHost](https://github.com/diezo/pinsta/) is released! Authentication update to the *Host Class*.

**[#01]** Users can now log in through their **Username** and **Password** to generate SessionId! [See this](https://github.com/diezo/pinsta#:~:text=NewSessionID(%22username%22%2C%20%22password%22))

## Installation
To install this package using [Python's PIP](https://pypi.org/project/pip/), run this command in a terminal window:
```shell
$ pip install pinsta
```

To update the existing package, run:
```shell
$ pip install pinsta --upgrade
```

## 🧔🏻‍♂️ Guest Mode
This mode doesn't require login and can be used to fetch publicly available data from Instagram's Servers. Following methods are supported till now:
- Check if username is available for registration
- Fetch someone's profile data
- Convert username to userid
- Convert userid to username

Here's an example where an instance of *Guest Class* is created to fetch [Cristiano Ronaldo's](https://www.instagram.com/cristiano/) profile information:

```python
from pinsta import Guest

guest = Guest()
profile = guest.profile("cristiano")

if profile is None:
    print("Something went wrong.")
else:
    print(profile.biography)
    print(profile.follower_count)
    print(profile.following_count)
```

## 🧔🏻‍♂️ Host Mode
Host mode requires login through SessionID, which should be passed as an argument during initialization.
It can be used to take actions that require login. Additionally, users can manage their own profile through this class.

These are the methods supported till now:
- Check authentication status of the user
- Follow/unfollow users
- Fetch someone's follower/following list
- Switch account type - 'Public' or 'Private'

Here's an example where an instance of *Host Class* is created to follow [Cristiano Ronaldo's](https://www.instagram.com/cristiano/) account:

```python
from pinsta import Host, NewSessionID

sessionid = NewSessionID("username", "password")

host = Host(sessionid)
status = host.follow("cristiano")

if status is None:
    print("Something went wrong.")
else:
    if status.following:
        print("Following!")
    
    elif status.follow_requested:
        print("Requested to follow!")
```

> ### **Note:**
> When you create a new sessionid through *NewSessionID()*, it's recommended to save it somewhere, and use the same sessionid (instead of creating a new one each time you need) until it expires or becomes invalid.
>
> This should be done to avoid unnecessary prolonged wait time while generating a new sessionid and also to prevent getting your account from getting flagged because of repetitive logins.

## 📋 Remember
Every function should return **None** on failure. So, it's recommended to add an *if statement* before using the actual data to avoid TypeErrors. Here's an example:
```python
from pinsta import Guest

guest = Guest()
available = guest.username_availability("cristiano")

if available is None:  # 'None' indicates failure
    print("Something went wrong.")
else:
    print(available)
```

## ❤️ Donate
If you wish to help me in the development of Pinsta, consider donating:

[<img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" width="150"/>](https://buymeacoffee.com/diezo)

## Disclaimer
This is a third-party package, and not approved by Instagram. It doesn't promote illegal activities or activities that violate [Instagram's Community Guidelines](https://help.instagram.com/477434105621119/) such as spamming users, creating bot accounts, misusing data etc. You are solely responsible for all the actions you take using this package.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/diezo/pinsta",
    "name": "pinsta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "instagram-client,instagram,api-wrapper,instagram-scraper,instagram-api,instagram-sdk,instagram-photos,instagram-api-python,instabot,instagram-stories,instagram-bot,instapy,instagram-downloader,instagram-account,instagram-crawler,instagram-private-api,igtv,instagram-automation,reels,instagram-feed",
    "author": "Deepak Soni",
    "author_email": "lonelycube@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/35/c0/0c5f8dd8ff258b35f1b2e988dc28d508887b723b44efec5d94078ecd91ea/pinsta-3.0.tar.gz",
    "platform": null,
    "description": "# \ud83e\udd16 Pinsta - Simple Instagram API\n[![PyPI](https://img.shields.io/pypi/v/pinsta)](https://pypi.org/project/pinsta)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pinsta)]()\n[![Downloads](https://static.pepy.tech/badge/pinsta)](https://pepy.tech/project/pinsta)\n[![Twitter Share](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fpinsta)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fpinsta)\n\n<img style=\"border-radius: 10px\" src=\"https://imgtr.ee/images/2023/06/14/Twfd4.png\"/>\n\nThis package lets you use Instagram's Internal Web API through simple functions and classes. Pinsta uses Instagram's Original Web API to scrape data which makes it a reliable choice over other third-party scrapers. This library mainly focuses on Simplicity & Reliability.\n\nTwo type of classes are supported - ***Guest & Host***.\n\n[<img style=\"margin-top: 10px\" src=\"https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg\" width=\"160\"/>](https://buymeacoffee.com/diezo)\n\n## \ud83d\udce2 Announcements\n**[#02]** [AutoHost](https://github.com/diezo/pinsta/) is released! Authentication update to the *Host Class*.\n\n**[#01]** Users can now log in through their **Username** and **Password** to generate SessionId! [See this](https://github.com/diezo/pinsta#:~:text=NewSessionID(%22username%22%2C%20%22password%22))\n\n## Installation\nTo install this package using [Python's PIP](https://pypi.org/project/pip/), run this command in a terminal window:\n```shell\n$ pip install pinsta\n```\n\nTo update the existing package, run:\n```shell\n$ pip install pinsta --upgrade\n```\n\n## \ud83e\uddd4\ud83c\udffb\u200d\u2642\ufe0f Guest Mode\nThis mode doesn't require login and can be used to fetch publicly available data from Instagram's Servers. Following methods are supported till now:\n- Check if username is available for registration\n- Fetch someone's profile data\n- Convert username to userid\n- Convert userid to username\n\nHere's an example where an instance of *Guest Class* is created to fetch [Cristiano Ronaldo's](https://www.instagram.com/cristiano/) profile information:\n\n```python\nfrom pinsta import Guest\n\nguest = Guest()\nprofile = guest.profile(\"cristiano\")\n\nif profile is None:\n    print(\"Something went wrong.\")\nelse:\n    print(profile.biography)\n    print(profile.follower_count)\n    print(profile.following_count)\n```\n\n## \ud83e\uddd4\ud83c\udffb\u200d\u2642\ufe0f Host Mode\nHost mode requires login through SessionID, which should be passed as an argument during initialization.\nIt can be used to take actions that require login. Additionally, users can manage their own profile through this class.\n\nThese are the methods supported till now:\n- Check authentication status of the user\n- Follow/unfollow users\n- Fetch someone's follower/following list\n- Switch account type - 'Public' or 'Private'\n\nHere's an example where an instance of *Host Class* is created to follow [Cristiano Ronaldo's](https://www.instagram.com/cristiano/) account:\n\n```python\nfrom pinsta import Host, NewSessionID\n\nsessionid = NewSessionID(\"username\", \"password\")\n\nhost = Host(sessionid)\nstatus = host.follow(\"cristiano\")\n\nif status is None:\n    print(\"Something went wrong.\")\nelse:\n    if status.following:\n        print(\"Following!\")\n    \n    elif status.follow_requested:\n        print(\"Requested to follow!\")\n```\n\n> ### **Note:**\n> When you create a new sessionid through *NewSessionID()*, it's recommended to save it somewhere, and use the same sessionid (instead of creating a new one each time you need) until it expires or becomes invalid.\n>\n> This should be done to avoid unnecessary prolonged wait time while generating a new sessionid and also to prevent getting your account from getting flagged because of repetitive logins.\n\n## \ud83d\udccb Remember\nEvery function should return **None** on failure. So, it's recommended to add an *if statement* before using the actual data to avoid TypeErrors. Here's an example:\n```python\nfrom pinsta import Guest\n\nguest = Guest()\navailable = guest.username_availability(\"cristiano\")\n\nif available is None:  # 'None' indicates failure\n    print(\"Something went wrong.\")\nelse:\n    print(available)\n```\n\n## \u2764\ufe0f Donate\nIf you wish to help me in the development of Pinsta, consider donating:\n\n[<img src=\"https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg\" width=\"150\"/>](https://buymeacoffee.com/diezo)\n\n## Disclaimer\nThis is a third-party package, and not approved by Instagram. It doesn't promote illegal activities or activities that violate [Instagram's Community Guidelines](https://help.instagram.com/477434105621119/) such as spamming users, creating bot accounts, misusing data etc. You are solely responsible for all the actions you take using this package.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\ud83d\udd25 Fastest & Simplest Python Package For Instagram Automation",
    "version": "3.0",
    "project_urls": {
        "Download": "https://github.com/diezo/pinsta/archive/refs/tags/v2.9.tar.gz",
        "Homepage": "https://github.com/diezo/pinsta"
    },
    "split_keywords": [
        "instagram-client",
        "instagram",
        "api-wrapper",
        "instagram-scraper",
        "instagram-api",
        "instagram-sdk",
        "instagram-photos",
        "instagram-api-python",
        "instabot",
        "instagram-stories",
        "instagram-bot",
        "instapy",
        "instagram-downloader",
        "instagram-account",
        "instagram-crawler",
        "instagram-private-api",
        "igtv",
        "instagram-automation",
        "reels",
        "instagram-feed"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35c00c5f8dd8ff258b35f1b2e988dc28d508887b723b44efec5d94078ecd91ea",
                "md5": "52fea8defe5e5113f4c1dd3d5eabaea2",
                "sha256": "8ed8510802522d3dedaec484447ebad28ad80f614ceea48174abe208da51a028"
            },
            "downloads": -1,
            "filename": "pinsta-3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "52fea8defe5e5113f4c1dd3d5eabaea2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16894,
            "upload_time": "2023-06-27T13:34:26",
            "upload_time_iso_8601": "2023-06-27T13:34:26.957765Z",
            "url": "https://files.pythonhosted.org/packages/35/c0/0c5f8dd8ff258b35f1b2e988dc28d508887b723b44efec5d94078ecd91ea/pinsta-3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-27 13:34:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "diezo",
    "github_project": "pinsta",
    "github_not_found": true,
    "lcname": "pinsta"
}
        
Elapsed time: 0.43870s