Gnip Powertrack Wrapper
Project description
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
from gnip import Gnip
g = Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORD
source="twitter"
)
print(g.get_rules())
Add and Delete rules
from gnip import Gnip
g = Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORD
source="twitter"
)
# Add 2 rules
g.add_rules([{"value":"rule1","tag":"tag1"}, {"value":"rule2"}])
# Delete 2 rules
g.delete_rules([{"value":"rule1","tag":"tag1"}, {"value":"rule2"}])
Stream
from gnip import Gnip
g = Gnip(YOUR_ACCOUNT_NAME,
login=YOUR_EMAIL,
password=YOUR_PASSWORD
)
s = g.connect_stream()
for line in s.iter_lines():
if line:
print(line)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-gnip-0.0.2.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file python-gnip-0.0.2.tar.gz
.
File metadata
- Download URL: python-gnip-0.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0c898042da528aa890dbe09a685cc0f171c8930dbec2dc2eb011ec9dee8c195a
|
|
MD5 |
99bc07357785aa7f3e7ded56eabdd290
|
|
BLAKE2b-256 |
ece691ed5c16b3fcffa5424757ab795ab6280f793e44d4dc65b3a3041c017487
|
File details
Details for the file python_gnip-0.0.2-py2-none-any.whl
.
File metadata
- Download URL: python_gnip-0.0.2-py2-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7d3fc65580f36d13f3a2b80bdf4fbbdabf487fac14c11863ca778bf6ed5cdbb9
|
|
MD5 |
eabbf6ab41acb95d247d6be78b4405c0
|
|
BLAKE2b-256 |
c3906b30217c9fcb120d5f69341ddb3a3d7b1020b9780e1f6559d8b705143fb2
|