Socket
Socket
Sign inDemoInstall

django-instagram-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-instagram-api

Django implementation for instagram API


Maintainers
1

Django Instagram API

Build Status Coverage Status

Application for interaction with Instagram API objects using Django ORM

Installation

pip install django-instagram-api

Add into settings.py lines:

INSTALLED_APPS = (
    ...
    'oauth_tokens',
    'm2m_history',
    'taggit',
    'instagram_api',
)

# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True                                        # to keep in DB expired access tokens
OAUTH_TOKENS_TWITTER_CLIENT_ID = ''                                # application ID
OAUTH_TOKENS_TWITTER_CLIENT_SECRET = ''                            # application secret key
OAUTH_TOKENS_TWITTER_USERNAME = ''                                 # user login
OAUTH_TOKENS_TWITTER_PASSWORD = ''                                 # user password

Usage examples

Simple API request

>>>from instagram_api.models import User, Media
>>>u = User.remote.fetch(237074561)
>>>print u
tnt_online

>>>followers = u.fetch_followers()

>>>medias = u.fetch_recent_media()
>>>print medias
[<Media: 935546412924881779_237074561>, <Media: 935398934535687014_237074561>, <Media: 935385433641536074_237074561>...]


>>>m = Media.remote.fetch('937539904871536462_190931988')
>>>comments = m.fetch_comments()
>>>likes = m.fetch_likes()

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc