Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. image:: https://codecov.io/gh/odrling/peony-twitter/branch/master/graph/badge.svg :target: https://codecov.io/gh/odrling/peony-twitter
.. image:: https://readthedocs.org/projects/peony-twitter/badge/?version=stable :target: https://peony-twitter.readthedocs.io/en/stable/?badge=stable :alt: Documentation Status
To install this module simply run::
pip install 'peony-twitter[all]'
This will install all the modules required to make peony run out of the box.
You might feel like some of them are not fit for your needs.
Check Advanced installation
_ for more information about how to install only
the modules you will need.
.. _Advanced installation: https://peony-twitter.readthedocs.io/en/latest/adv_usage/install.html#adv-install
You can use peony.oauth_dance
to authorize your client:
.. code-block:: python
>>> from peony.oauth_dance import oauth_dance
>>> tokens = oauth_dance(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET)
>>> from peony import PeonyClient
>>> client = PeonyClient(**tokens)
This should open a browser to get a pin to authorize your application.
You can easily create a client using the class PeonyClient
.
Make sure to get your api keys and access tokens from
Twitter's application management page
_ and/or to Authorize your client
_
.. code-block:: python
import asyncio
# NOTE: the package name is peony and not peony-twitter
from peony import PeonyClient
loop = asyncio.get_event_loop()
# create the client using your api keys
client = PeonyClient(consumer_key=YOUR_CONSUMER_KEY,
consumer_secret=YOUR_CONSUMER_SECRET,
access_token=YOUR_ACCESS_TOKEN,
access_token_secret=YOUR_ACCESS_TOKEN_SECRET)
# this is a coroutine
req = client.api.statuses.update.post(status="I'm using Peony!!")
# run the coroutine
loop.run_until_complete(req)
.. _Twitter's application management page: https://apps.twitter.com
.. _Authorize your client: #authorize-your-client
Read Peony's documentation
_ on Read The Docs.
There is a #peony
_ channel on the Libera IRC network
_ for support and
discussion about Peony.
You can use Libera's webchat
_ to connect to this channel from your web browser.
.. _Peony's documentation: https://peony-twitter.readthedocs.io .. _#peony: irc://irc.libera.chat/peony .. _Libera IRC network: https://libera.chat .. _Libera's webchat: https://web.libera.chat/#peony
Every kind of contribution is appreciated.
If you find a bug please start an issue and if you're very motivated you can create a pull request.
If you have a suggestion you can also start an issue and create a pull request if you managed to make it work.
To run the tests run:
.. code-block:: bash
make
The first time this command is run it will install all the dependencies which can take a bit of time.
The tests include a code style test. The code style is mostly PEP8, the only exception so far being long urls included in docstrings and some imports that are not at the top of the file (because they can't be there).
You can also use tox to run the tests, a configuration file is provided:
.. code-block:: bash
tox
FAQs
An asynchronous Twitter API client for Python 3.6+
We found that peony-twitter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.