Skip to content

Latest commit

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

python-gnip

Gnip PowerTrack Wrapper

Installation

Method with pip: if you have pip installed, just type this in a terminal (sudo is optional on some systems)

pip install python-gnip

Method by hand: download the sources, either on PyPI or (if you want the development version) on Github, unzip everything in one folder, open a terminal and type

python setup.py install

Usage

Rules

fromgnipimportGnipg=Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORDsource="twitter"
)
print(g.get_rules())

Add and Delete rules

fromgnipimportGnipg=Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORDsource="twitter"
)
# Add 2 rulesg.add_rules([{"value":"rule1","tag":"tag1"}, {"value":"rule2"}])
# Delete 2 rulesg.delete_rules([{"value":"rule1","tag":"tag1"}, {"value":"rule2"}])

Stream

fromgnipimportGnipg=Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORD
)
s=g.connect_stream()
forlineins.iter_lines():
ifline:
print(line)

About

Python lib for Gnip PowerTrack

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages