Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tweet_model
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
serpucga
tweet_model
Commits
de0fa93d
Commit
de0fa93d
authored
Mar 20, 2019
by
Serbaf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
Pretty stable release with the basic intended functionality
parents
a8d5c543
90680e39
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
12 deletions
+46
-12
HISTORY.rst
HISTORY.rst
+25
-0
README.rst
README.rst
+13
-6
requirements_dev.txt
requirements_dev.txt
+2
-1
setup.py
setup.py
+6
-5
tweet_model.py
tweet_model/tweet_model.py
+0
-0
No files found.
HISTORY.rst
View file @
de0fa93d
...
@@ -6,3 +6,28 @@ History
...
@@ -6,3 +6,28 @@ History
------------------
------------------
* First release on PyPI.
* First release on PyPI.
0.2.0 (2019-03-20)
------------------
* Completed the Tweet class that allows the user to make usable instances of a
tweet model. Includes initialization of all the Tweet attributes indicated in
the Twitter documentation (default to None, unless the user provides a value)
and overriding of __getitem__ to provide a dictionary-like access to the
information.
0.3.0 (2019-03-20)
------------------
* Added method "get_tweets_from_csv()", which gets a CSV file as an argument
and returns a list containing as many Tweet objects as lines (minus the
header) in the CSV file. The header of the CSV is used to know which
attributes should be set.
* The method will raise an error and exit if any item in the header does not
match with the specification of the Tweet object (for example, the header
word "media.sizes.thumb.h" would be valid, but "user.lightsaber.color" would
not.
* At this point, the method took 1.75s aprox to read and return the contents of
a 5.7 MB as a list of 'Tweet's. This could be troublesome with very large
collections in a future if the progression of time was proportional with the
file size (estimation would be 25 minutes for a 5 GB file)
README.rst
View file @
de0fa93d
...
@@ -3,11 +3,8 @@ Tweet Model
...
@@ -3,11 +3,8 @@ Tweet Model
===========
===========
.. image:: https://img.shields.io/pypi/v/tweet_model.svg
.. image:: https://img.shields.io/pypi/v/tweet_model_serpucga.svg
:target: https://pypi.python.org/pypi/tweet_model
:target: https://pypi.python.org/pypi/tweet_model_serpucga
.. image:: https://img.shields.io/travis/Serbaf/tweet_model.svg
:target: https://travis-ci.org/Serbaf/tweet_model
.. image:: https://readthedocs.org/projects/tweet-model/badge/?version=latest
.. image:: https://readthedocs.org/projects/tweet-model/badge/?version=latest
:target: https://tweet-model.readthedocs.io/en/latest/?badge=latest
:target: https://tweet-model.readthedocs.io/en/latest/?badge=latest
...
@@ -28,10 +25,20 @@ Dashboard project.
...
@@ -28,10 +25,20 @@ Dashboard project.
Features
Features
--------
--------
* TODO
* A modelization of a tweet in the form of class Tweet. This class contains a
constructor that initializes all the possible tweet attributes to None
except those indicated otherwise.
* The inner objects of a tweet ("user", "entities", "places", etc.) are stored
internally as nested dictionaries.
* The __getitem__() method for Tweet is overriden to allow a dictionary-like
access to the tweet contents. For example, if "tweet1" is an instance of
Tweet, one could do tweet1["id"] to get the id of that tweet, or
tweet1["user"]["name"] to get the name of the person that published the
tweet.
Credits
Credits
-------
-------
Creator: Sergio
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
...
...
requirements_dev.txt
View file @
de0fa93d
...
@@ -8,4 +8,5 @@ coverage==4.5.1
...
@@ -8,4 +8,5 @@ coverage==4.5.1
Sphinx==1.8.1
Sphinx==1.8.1
twine==1.12.1
twine==1.12.1
# App requirements
tweetmanager-serpucga==1.1.4
setup.py
View file @
de0fa93d
...
@@ -13,9 +13,9 @@ with open('HISTORY.rst') as history_file:
...
@@ -13,9 +13,9 @@ with open('HISTORY.rst') as history_file:
requirements
=
[
'Click>=6.0'
,
]
requirements
=
[
'Click>=6.0'
,
]
setup_requirements
=
[
]
setup_requirements
=
[]
test_requirements
=
[
]
test_requirements
=
[]
setup
(
setup
(
author
=
"Sergio Puche García"
,
author
=
"Sergio Puche García"
,
...
@@ -33,7 +33,8 @@ setup(
...
@@ -33,7 +33,8 @@ setup(
'Programming Language :: Python :: 3.6'
,
'Programming Language :: Python :: 3.6'
,
'Programming Language :: Python :: 3.7'
,
'Programming Language :: Python :: 3.7'
,
],
],
description
=
"A modelization of a tweet object with convenient features and functionalities"
,
description
=
"A modelization of a tweet object with convenient features "
+
"and functionalities"
,
entry_points
=
{
entry_points
=
{
'console_scripts'
:
[
'console_scripts'
:
[
'tweet_model=tweet_model.cli:main'
,
'tweet_model=tweet_model.cli:main'
,
...
@@ -44,12 +45,12 @@ setup(
...
@@ -44,12 +45,12 @@ setup(
long_description
=
readme
+
'
\n\n
'
+
history
,
long_description
=
readme
+
'
\n\n
'
+
history
,
include_package_data
=
True
,
include_package_data
=
True
,
keywords
=
'tweet_model'
,
keywords
=
'tweet_model'
,
name
=
'tweet_model'
,
name
=
'tweet_model
_serpucga
'
,
packages
=
find_packages
(
include
=
[
'tweet_model'
]),
packages
=
find_packages
(
include
=
[
'tweet_model'
]),
setup_requires
=
setup_requirements
,
setup_requires
=
setup_requirements
,
test_suite
=
'tests'
,
test_suite
=
'tests'
,
tests_require
=
test_requirements
,
tests_require
=
test_requirements
,
url
=
'https://github.com/Serbaf/tweet_model'
,
url
=
'https://github.com/Serbaf/tweet_model'
,
version
=
'0.
1.0
'
,
version
=
'0.
3.3
'
,
zip_safe
=
False
,
zip_safe
=
False
,
)
)
tweet_model/tweet_model.py
View file @
de0fa93d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment