{ "info": { "author": "Carlos Montecinos Geisse", "author_email": "carlos.w.montecinos@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "=============================\ncoo: Schedule Twitter updates\n=============================\n\n.. image:: https://badge.fury.io/py/coo.svg\n :target: https://badge.fury.io/py/coo\n.. image:: https://travis-ci.org/wilfredinni/coo.svg?branch=master\n :target: https://travis-ci.org/wilfredinni/coo\n.. image:: https://codecov.io/gh/wilfredinni/coo/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/wilfredinni/coo\n.. image:: https://readthedocs.org/projects/coo/badge/?version=latest\n :target: https://coo.readthedocs.io/en/latest/?badge=latest\n.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n :target: https://opensource.org/licenses/Apache-2.0\n\nCoo is an easy to use Python library for scheduling Twitter updates. To use it, you need\nto first apply for a developer account in the\n`Twitter Developers Platform `_ and generate the Keys and\nAccess Tokens.\n\n.. code-block:: python\n\n pip install coo\n\nInitializing\n\n.. code-block:: python\n\n from coo import Coo\n\n at = Coo(\n \"consumer_key\",\n \"consumer_secret\",\n \"access_token\",\n \"access_token_secret\",\n preview=False,\n )\n\nAlternatively, you can set ``preview=True`` and print your tweets in the terminal instead\nto post them on Twitter.\n\nScheduling Twitter updates:\n\n\n.. code-block:: python\n\n from coo import Coo\n\n at = Coo(\n \"consumer_key\",\n \"consumer_secret\",\n \"access_token\",\n \"access_token_secret\"\n )\n\n tweets = [\n (\"2030-12-05 16:30\", template, \"Awesome Twitter update.\"),\n (\"2030-10-28 18:50\", template, \"Another awesome Twitter update.\"),\n (\"2030-10-29 18:15\", template2, \"One more update.\"),\n (\"2030-11-01 13:45\", None, \"Twitter update without a template.\"),\n\n at.schedule(tweets, time_zone=\"America/Santiago\")\n\nOr you can use a list of strings and add a ``delay``, ``interval`` and a ``template``:\n\n.. code-block:: python\n\n tweets = [\n \"My first awesome Twitter Update\",\n \"My second awesome Twitter Update\",\n \"My third awesome Twitter Update\",\n \"My fourth awesome Twitter Update\",\n \"My fifth awesome Twitter Update\",\n \"My sixth awesome Twitter Update\",\n ]\n\n at.tweet(tweets, delay=\"13:45\", interval=\"four_hours\", template=my_template)\n\nSchedule Twitter Updates\n========================\n\nSchedule updates with `datetime` strings or integers and use custom a `Template`_ if needed.\n\n.. code-block:: python\n\n Coo.schedule(updates, time_zone)\n\nFull example:\n\n.. code-block:: python\n\n from coo import Coo\n\n at = Coo(\n \"consumer_key\",\n \"consumer_secret\",\n \"access_token\",\n \"access_token_secret\"\n )\n\n tweets = [\n # datetime with and without templates\n (\"2030-10-28 18:50\", template, \"My Twitter update with a template.\"),\n (\"2030-10-29 18:15\", template2, \"Update with a different template.\"),\n (\"2030-11-01 13:45\", None, \"Twitter update without a template.\"),\n\n # date with and without templates\n (\"2030-12-25\", template3, \"Merry christmas!\"),\n (\"2031-01-01\", None, \"And a happy new year!\"),\n\n # time with and without templates\n (\"18:46\", template2, \"Will be post today at 18:46.\"),\n (\"23:00\", None, \"A tweet for today at 23:00.\"),\n\n # integer (seconds) with and without templates\n (3600, template, \"This tweet will be posted in an hour.\"),\n (86400, None, \"This one, tomorrow at the same hour.\"),\n ]\n\n at.schedule(tweets, time_zone=\"America/Santiago\")\n\nParsing DateTime strings\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n- If a time zone is not specified, it will set to `local`.\n- The time will be set to 00:00:00 if it's not specified.\n- When passing only time information the date will default to today.\n- A future date is needed, otherwise a `ScheduleError` is raised.\n\nHere you can find all the\n`Time Zones `_.\n\nMedia Files\n^^^^^^^^^^^\n\nThere are two ways to add media files to your tweets. The first and easiest is to use one global file for all the updates:\n\n.. code-block:: python\n\n at.schedule(tweets, time_zone=\"America/Santiago\", media=\"path/to/file.png\")\n\nAlso, an individual file can be set for each one of the updates:\n\n.. code-block:: python\n\n tweets = [\n (\"2030-10-28 18:50\", template, \"Update with an image.\", \"pics/owl.png\"),\n (\"2030-10-29 18:15\", template, \"Update with other media.\", \"videos/funny_video.mp4\"),\n (\"2030-11-01 13:45\", template, \"Tweet without media.\"),\n ]\n\nFinally, it is possible to combine these to ways. For example, if most of the tweets are gonna use the same media and just a few will have a different or none:\n\n.. code-block:: python\n\n tweets = [\n (\"2030-11-01 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-02 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-03 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-04 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-05 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-06 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-07 13:45\", template, \"Tweet with global media.\"),\n (\"2030-11-08 13:45\", template, \"Tweet without media.\", None),\n (\"2030-11-09 13:45\", template, \"Tweet without media.\", None),\n (\"2030-12-10 18:50\", template, \"Update with an image.\", \"pics/owl.png\"),\n (\"2030-12-11 18:15\", template, \"Update with other media.\", \"videos/funny_video.mp4\"),\n ]\n\n at.schedule(tweets, time_zone=\"America/Santiago\", media=\"path/to/global_media.png\")\n\n\nTweet an ordered list of strings\n================================\n\nPost ordered updates with `Delay`_, `Interval`_, and a `Template`_ if needed.\n\n.. code-block:: python\n\n Coo.tweet(updates, delay, interval, template, time_zone)\n\n.. code-block:: python\n\n from coo import Coo\n\n at = Coo(\n \"consumer_key\",\n \"consumer_secret\",\n \"access_token\",\n \"access_token_secret\"\n )\n\n tweets = [\n \"My first awesome Twitter Update\",\n \"My second awesome Twitter Update\",\n \"My third awesome Twitter Update\",\n \"My fourth awesome Twitter Update\",\n \"My fifth awesome Twitter Update\",\n \"My sixth awesome Twitter Update\",\n ]\n\n # post the twitter updates\n at.tweet(tweets)\n\nDelay\n^^^^^\n\nYou can use ``datetime``, ``date`` and ``time`` strings, integers as seconds and some\n`Keywords`_: ``half_hour``, ``one_hour``, ``one_day`` and ``one_week`` between others to\ndelay the post of your first update.\n\n.. code-block:: python\n\n # datetime, date and time strings\n at.tweet(tweets, delay=\"2030-11-24 13:45\", time_zone=\"America/Santiago\")\n at.tweet(tweets, delay=\"2030-11-24\", time_zone=\"Australia/Sydney\")\n at.tweet(tweets, delay=\"13:45\", time_zone=\"America/New_York\")\n\n # \"keywords\"\n at.tweet(tweets, delay=\"one_week\")\n\n # integer\n at.tweet(tweets, delay=604800)\n\nWhen parsing DateTime strings:\n\n- If a time zone is not specified, it will set to `local`.\n- The time will be set to 00:00:00 if it's not specified.\n- When passing only time information the date will default to today.\n- A future date is needed, otherwise a `ScheduleError` is raised.\n\nHere you can find all the `Time Zones `_.\n\nInterval\n^^^^^^^^\n\nUse integers as seconds or some strings as `Keywords`_: ``half_hour``, ``one_hour``,\n``one_day`` and ``one_week`` between others.\n\n.. code-block:: python\n\n # \"keywords\"\n at.tweet(tweets, interval=\"four_hours\")\n\n # integers\n at.tweet(tweets, interval=14400)\n\nMedia files\n^^^^^^^^^^^\n\nUse one media file for all of your updates:\n\n.. code-block:: python\n\n at.tweet(tweets, media=\"path/to/media.jpeg\")\n\nRandom updates\n^^^^^^^^^^^^^^\n\nTo tweet your updates randomly:\n\n.. code-block:: python\n\n at.tweet(tweets, aleatory=True)\n\nKeywords\n^^^^^^^^\n\n================ =======\nKeyword Seconds\n================ =======\nnow 0\nhalf_hour 1800\none_hour 3600\ntwo_hours 7200\nfour_hours 14400\nsix_hours 21600\neight_hours 28800\nten_hours 36000\ntwelve_hours 43200\nfourteen_hours 50400\nsixteen_hours 57600\neighteen_hours 64800\ntwenty_hours 72000\ntwenty_two_hours 79200\none_day 86400\ntwo_days 172800\nthree_days 259200\nfour_days 345600\nfive_days 432000\nsix_days 518400\none_week 604800\n================ =======\n\nTemplate\n========\n\nTemplates are very simple, just use a multiline string and add a ``$message``\nwhere you want your message to appear.\n\n.. code-block:: python\n\n template = \"\"\"My awesome header\n\n $message\n\n #python #coding #coo\n \"\"\"\n\nThe Twitter API\n===============\n\nCoo is written using the `Python Twitter `_\nwrapper, and through `Coo.api` you gain access to all of his models:\n\n.. code-block:: python\n\n # get your followers\n followers = at.api.GetFollowers()\n\n # get your direct messages\n d_messages = at.api.GetDirectMessages()\n\n # favorited tweets\n favorites = at.api.GetFavorites()\n\n # mentions\n mentions = at.api.GetMentions()\n\n # retweets\n retweets = at.api.GetRetweets()\n\nAnd a lot more. If you are interested, check their `documentation `_.\n\nDocumentation\n=============\n\nDocumentation available at `readthedocs.org `_.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wilfredinni/coo", "keywords": "coo", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "coo", "package_url": "https://pypi.org/project/coo/", "platform": "", "project_url": "https://pypi.org/project/coo/", "project_urls": { "Homepage": "https://github.com/wilfredinni/coo" }, "release_url": "https://pypi.org/project/coo/0.1.3/", "requires_dist": [ "python-twitter", "pendulum" ], "requires_python": "", "summary": "Schedule Twitter Updates with Easy", "version": "0.1.3" }, "last_serial": 4594817, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c03562cbe29a0161bdf238474f2028e7", "sha256": "5250969510b423e3f927bae9cf2e7bef3b05fcd9dd14321bc90b92eb82eff443" }, "downloads": -1, "filename": "coo-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c03562cbe29a0161bdf238474f2028e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7461, "upload_time": "2018-11-20T00:28:20", "url": "https://files.pythonhosted.org/packages/19/37/7709891546a39f99adc264c476f757db60e802588646bd7f5245a539daa1/coo-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "033509f34248549f1d0ded876d6b08c0", "sha256": "86928b902cf4cbc1a59a89cbbbdf8bcbf8e20d2812906c3721b6cc7b0c0e9c41" }, "downloads": -1, "filename": "coo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "033509f34248549f1d0ded876d6b08c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4643, "upload_time": "2018-11-20T00:28:24", "url": "https://files.pythonhosted.org/packages/4e/58/5fbbb7628aef391ad39d9790f28f7e13a276e95c5e011f831dd549bcef5a/coo-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "01daf917588ecdeb28c9cc0c1c196dc4", "sha256": "c0884155b4d6674c8d79ded7190766bc37b3739bc30a8525351bf06909786251" }, "downloads": -1, "filename": "coo-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "01daf917588ecdeb28c9cc0c1c196dc4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11566, "upload_time": "2018-11-20T00:36:24", "url": "https://files.pythonhosted.org/packages/30/e4/74cab8e5c02f5cd10828887ed99d66aa3e697e5609f5e1b14aca1bbf5eb7/coo-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4022852df076e636a1f3307f86f5050", "sha256": "c137edefa530cd2095c924af95ec4c6859fc9d11c2d39c63af89a938891e5adf" }, "downloads": -1, "filename": "coo-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f4022852df076e636a1f3307f86f5050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8636, "upload_time": "2018-11-20T00:36:26", "url": "https://files.pythonhosted.org/packages/7c/66/883b3f3d002ed00c22dba9cc7435a6e2ebf0edc856b78fd2723e23611754/coo-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7854f009670980c47676e2ff1434fbfd", "sha256": "e7886ada840211dcc9eebcba759b9e54b4ddf924013a09a5b7288248bf1e85da" }, "downloads": -1, "filename": "coo-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7854f009670980c47676e2ff1434fbfd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11704, "upload_time": "2018-11-29T22:35:52", "url": "https://files.pythonhosted.org/packages/b3/9a/90754c51ed1302c1e870e4380ce30fdb0c029a287d70bebc5081907a1b4d/coo-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd5ea80a082ab92eb92f7058f6e753c2", "sha256": "fe7a50e5a23aaf73d8544faa6ecf77a30efa0b90971d236cd11cdb11c14739f1" }, "downloads": -1, "filename": "coo-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cd5ea80a082ab92eb92f7058f6e753c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8751, "upload_time": "2018-11-29T22:35:54", "url": "https://files.pythonhosted.org/packages/3b/47/71f27c21733b64e07c701e19c4038968b69554f4e8aeef653a2743ec107a/coo-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "89d3fed05183726f79a851be46bba196", "sha256": "a651838166f6c72d5e4482746b420a2bdb38c8266b24c8a5147e9ce17c4bdbcb" }, "downloads": -1, "filename": "coo-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "89d3fed05183726f79a851be46bba196", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12430, "upload_time": "2018-12-13T15:35:06", "url": "https://files.pythonhosted.org/packages/92/72/f370bf72150eac135449cd58034c8abd7ba51bbc02023251d95762dda1fe/coo-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81f658be37fe37db698225740a3c44d1", "sha256": "63f7196307ec708f204bbf696ed032310b7cf15069dfcf2df239526fd64a7235" }, "downloads": -1, "filename": "coo-0.1.3.tar.gz", "has_sig": false, "md5_digest": "81f658be37fe37db698225740a3c44d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10109, "upload_time": "2018-12-13T15:35:09", "url": "https://files.pythonhosted.org/packages/a5/9e/a6bc262c9832b3df14c3803d4be9bd29187eff87c7823b92e3e51c0d2542/coo-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89d3fed05183726f79a851be46bba196", "sha256": "a651838166f6c72d5e4482746b420a2bdb38c8266b24c8a5147e9ce17c4bdbcb" }, "downloads": -1, "filename": "coo-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "89d3fed05183726f79a851be46bba196", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12430, "upload_time": "2018-12-13T15:35:06", "url": "https://files.pythonhosted.org/packages/92/72/f370bf72150eac135449cd58034c8abd7ba51bbc02023251d95762dda1fe/coo-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81f658be37fe37db698225740a3c44d1", "sha256": "63f7196307ec708f204bbf696ed032310b7cf15069dfcf2df239526fd64a7235" }, "downloads": -1, "filename": "coo-0.1.3.tar.gz", "has_sig": false, "md5_digest": "81f658be37fe37db698225740a3c44d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10109, "upload_time": "2018-12-13T15:35:09", "url": "https://files.pythonhosted.org/packages/a5/9e/a6bc262c9832b3df14c3803d4be9bd29187eff87c7823b92e3e51c0d2542/coo-0.1.3.tar.gz" } ] }