Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 02d99cf

Browse files
author
jakeshi
committed
Resolved merge conflict by incorporating both suggestions.
2 parents c5fd9b9 + beeec98 commit 02d99cf

264 files changed

Lines changed: 17248 additions & 15827 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ var
1818
sdist
1919
develop-eggs
2020
.installed.cfg
21+
.eggs
22+
.cache
2123

2224
# Installer logs
2325
pip-log.txt
2426

2527
# Unit test / coverage reports
2628
.coverage
29+
.codecov-token
2730
.tox
31+
htmlcov
32+
.tox
33+
nosetests.xml
34+
htmlcov
35+
coverage.xml
2836

2937
# PyCharm data
3038
.idea
@@ -34,3 +42,12 @@ pip-log.txt
3442

3543
#Mr Developer
3644
.mr.developer.cfg
45+
46+
#Environment
47+
env
48+
.python-version
49+
50+
violations.flake8.txt
51+
52+
# Built docs
53+
doc/_build/**

AUTHORS.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Originally two libraries by DeWitt Clinton and Mike Taylor which was then merged into python-twitter.
2+
3+
Now it's a full-on open source project with many contributors over time:
4+
5+
* Jodok Batlogg,
6+
* Kyle Bock,
7+
* Brad Choate,
8+
* Robert Clarke,
9+
* Jim Cortez,
10+
* Pierre-Jean Coudert,
11+
* Aish Raj Dahal,
12+
* Thomas Dyson,
13+
* Jim Easterbrook
14+
* Yoshinori Fukushima,
15+
* Hameedullah Khan,
16+
* Osama Khalid,
17+
* Omar Kilani,
18+
* Domen Kožar,
19+
* Robert Laquey,
20+
* Jason Lemoine,
21+
* Pradeep Nayak,
22+
* Ian Ozsvald,
23+
* Nicolas Perriault,
24+
* Glen Tregoning,
25+
* Lars Weiler,
26+
* Sebastian Wiesinger,
27+
* Jake Robinson,
28+
* Muthu Annamalai,
29+
* abloch,
30+
* cahlan,
31+
* dpslwk,
32+
* edleaf,
33+
* ecesena,
34+
* git-matrix,
35+
* sbywater,
36+
* thefinn93,
37+
* themylogin,

CHANGES

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
2016-05-25
2+
Going forward all changes will be tracked in docs/changelog.rst
3+
4+
2015-12-28
5+
Large number of changes related to making the code Python v3 compatible.
6+
See the messy details at https://github.com/bear/python-twitter/pull/251
7+
8+
Pull Requests
9+
#267 initialize Api.__auth fixes #119 by rbpasker
10+
#266 Add full_text and page options in GetDirectMessages function by mistersalmon
11+
#264 Updates Media object with new methods, adds id param, adds tests by jeremylow
12+
#262 Update get_access_token.py by lababidi
13+
#261 Adding Collections by ryankicks
14+
#260 Added UpdateBackgroundImage method and added profile_link_color argument to UpdateProfile by BrandonBielicki
15+
#259 Added GetFriendIDsPaged by RockHoward
16+
#254 Adding api methods for suggestions and suggestions/:slug by trentstollery
17+
#253 Added who parameter to api.GetSearch by wilsonand1
18+
#250 adds UpdateFriendship (shared Add/Edit friendship) by jheld
19+
#249 Fixed Non-ASCII printable representation in Trend by der-Daniel
20+
#246 Add __repr__ for status by era
21+
#245 Python-3 Fix: decode bytestreams for json load by ligthyear
22+
#243 Remove references to outdated API functionality: GetUserByEmail by Vector919
23+
#239 Correct GetListsList docstring by tedmiston
24+
25+
Probably a whole lot that I missed - ugh!
26+
27+
2015-10-05
28+
Added who to api.GetSearch
29+
30+
2014-12-29
31+
removed reference to simplejson
32+
33+
2014-12-24
34+
bump version to v2.3
35+
bump version to v2.2
36+
PEP8 standardization
37+
38+
2014-07-10
39+
bump version to v2.1
40+
41+
2014-07-10
42+
update copyright years
43+
change setup.py to allow installing via wheel
44+
renamed README.md to README.rst
45+
added AUTHORS.rst
46+
147
2014-02-17
248
changed version to 1.3 and then to 1.3.1 because I forgot to include CHANGES
349
fix Issue 143 - GetStatusOembed() url parameter was being stomped on
@@ -37,7 +83,7 @@ need to backfill commit log entries!
3783
2013-06-07
3884
changed version to 1.0.1
3985
added README bit about Python version requirement
40-
86+
4187
2013-06-04
4288
changed version to 1.0
4389
removed doc directory until we can update docs for v1.1 API
@@ -54,7 +100,7 @@ need to backfill commit log entries!
54100

55101
removed GetPublicTimeline from the docs so as to stop confusing
56102
new folks since it was the first example given ... d'oh!
57-
103+
58104
2013-02-10
59105
bumped version to 0.8.6
60106

@@ -78,7 +124,7 @@ need to backfill commit log entries!
78124
to push to PyPI and other places
79125

80126
all work now will be on getting the v1.1 API supported
81-
127+
82128
2012-11-04
83129
https://github.com/bear/python-twitter/issues/4
84130
Api.UserLookUp() throws attribute error when corresponding screen_name is not found

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2007-2013 The Python-Twitter Developers
1+
Copyright 2007-2014 The Python-Twitter Developers
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

GAE.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
================================================
2+
How to use python-twitter with Google App Engine
3+
================================================
4+
5+
**********
6+
Background
7+
**********
8+
9+
Google App Engine uses virtual machines to do work and serve your application's content. In order to make a 'regular' external web request, the instance must use the built-in urlfetch library provided by Google in addition to the traditional python requests library. As a result, a few extra steps must be followed to use python-twitter on App Engine.
10+
11+
12+
*************
13+
Prerequisites
14+
*************
15+
16+
Follow the `third party vendor library install instructions <https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#vendoring>`_ to include the two dependency libraries listed in ``requirements.txt``: ``requests`` and ``requests_oauthlib``, as well as this ``python-twitter`` library. Typically you can just place the three module folders into the same place as your app.yaml file; it might look something like this:
17+
18+
| myapp/
19+
| ├── twitter/
20+
| ├── requests_oauthlib/
21+
| ├── requests_toolbelt/
22+
| ├── main.py
23+
| └── app.yaml
24+
25+
26+
********
27+
app.yaml
28+
********
29+
30+
In order to use HTTPS, you'll have to make sure the built-in SSL library is properly imported in your ``app.yaml`` file. Here's what that section of your ``app.yaml`` file might look like:
31+
32+
| libraries:
33+
| - name: jinja2
34+
| version: latest
35+
| - name: webapp2
36+
| version: latest
37+
| - name: ssl
38+
| version: latest
39+
40+
41+
****************************
42+
Limitations & Considerations
43+
****************************
44+
45+
Caching
46+
^^^^^^^
47+
When using twitter-python on App Engine, caching is disabled. You'll have to add and manage App Engine's memcache logic on your own if you require any caching beyond what is probably already setup on App Engine by default.
48+
49+
Datastore
50+
^^^^^^^^^
51+
If you plan to store tweets or other information returned by the API in Datastore, you'll probably want to make your own NDP models to store the desired components of the response rather than shoving the whole response into an entity.
52+
53+
Sockets
54+
^^^^^^^^^
55+
When urllib3 is imported on App Engine it will throw a warning about sockets: ``AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox...`` This is just a warning that you'd have to use the Sockets API if you intend to use the sockets feature of the library, which we don't use in python-twitter so it can be ignored.

MANIFEST.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ include CHANGES
22
include COPYING
33
include LICENSE
44
include NOTICE
5-
include README.md
6-
include *.py
7-
recursive-include examples *.py
8-
recursive-include testdata *.json
5+
include *.rst
6+
include requirements.txt
97
prune .DS_Store

Makefile

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
help:
3+
@echo " env install all production dependencies"
4+
@echo " dev install all dev and production dependencies (virtualenv is assumed)"
5+
@echo " docs build documentation"
6+
@echo " clean remove unwanted stuff"
7+
@echo " lint check style with flake8"
8+
@echo " test run tests"
9+
@echo " coverage run tests with code coverage"
10+
11+
env:
12+
pip install -Ur requirements.txt
13+
14+
pyenv:
15+
pyenv install -s 2.7.11
16+
pyenv install -s 3.5.2
17+
pyenv install -s pypy-5.3.1
18+
# pyenv install -s pypy3-2.4.0
19+
pyenv local 2.7.11 3.5.2 pypy-5.3.1 # pypy3-2.4.0
20+
21+
dev: env pyenv
22+
pip install -Ur requirements.testing.txt
23+
24+
info:
25+
@python --version
26+
@pyenv --version
27+
@pip --version
28+
29+
clean:
30+
rm -fr build
31+
rm -fr dist
32+
find . -name '*.pyc' -exec rm -f {} \;
33+
find . -name '*.pyo' -exec rm -f {} \;
34+
find . -name '*~' ! -name '*.un~' -exec rm -f {} \;
35+
36+
docs:
37+
$(MAKE) -C doc html
38+
39+
lint:
40+
pycodestyle --config={toxinidir}/setup.cfg twitter tests
41+
42+
test: lint
43+
python setup.py test
44+
45+
tox: clean
46+
tox
47+
48+
coverage: clean
49+
coverage run --source=twitter setup.py test --addopts "--ignore=venv"
50+
coverage html
51+
coverage report
52+
53+
ci: pyenv
54+
tox
55+
CODECOV_TOKEN=`cat .codecov-token` codecov
56+
57+
build: clean
58+
python setup.py check
59+
python setup.py sdist
60+
python setup.py bdist_wheel
61+
62+
upload: clean
63+
pyenv 2.7.11
64+
python setup.py sdist upload
65+
python setup.py bdist_wheel upload
66+
pyenv 3.5.1
67+
python setup.py bdist_wheel upload
68+
pyenv local 2.7.11 3.5.2 pypy-5.3.1

NOTICE

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
NOTICE
22

3-
The simplejson library (http://simplejson.googlecode.com) is used under the terms of the MIT license and is copyright Bob Ippolito.
4-
See http://simplejson.googlecode.com/svn/trunk/LICENSE.txt for details.
5-
6-
The python-oauth2 library (http://github.com/simplegeo/python-oauth2) is used under the terms of the MIT license and is copyright Leah Culver.
7-
See http://github.com/simplegeo/python-oauth2/blob/master/LICENSE.txt for details.
8-
9-
The httplib2 library (http://code.google.com/p/httplib2) is used under the terms of the MIT license and is copyright Joe Gregorio.
10-
See http://code.google.com/p/httplib2/source/browse/python2/httplib2/__init__.py for details.
11-
123
This code is made available under the Apache License and is copyright the Python-Twitter Developers.
13-

0 commit comments

Comments
 (0)