Metadata-Version: 2.1
Name: SlyTwitter
Version: 0.2.0
Summary: No-boilerplate, async and typed Twitter access.
Author: Dunkyl 🔣🔣
License: MIT License
        
        Copyright (c) 2021 dunkyl
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://docs.dunkyl.net/SlyTwitter-Python/
Project-URL: Repository, https://github.com/dunkyl/SlyTwitter-Python
Project-URL: Documentation, https://docs.dunkyl.net/SlyTwitter-Python/
Project-URL: Bug Tracker, https://github.com/dunkyl/SlyTwitter-Python/issues
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# ![sly logo](https://raw.githubusercontent.com/dunkyl/SlyMeta/main/sly%20logo.svg) Sly Twitter for Python

<!-- elevator begin -->

> 🚧 **This library is an early work in progress! Breaking changes may be frequent.**

> 🐍 For Python 3.10+

## No-boilerplate, *async* and *typed* Twitter access. 😋

```shell
pip install slytwitter
```

This library does not have full coverage.
Premium version 1.1 is not supported.
Currently, the following topics are supported:

* Posting and managing tweets, with media
* Reading followers

V2 may or may not work, due to changes in access policy to Twitter's API. If it is, the following topics are supported:

* Reading followers and following
* Getting users

You can directly grant user tokens using the command line, covering the whole OAuth 1.0 grant process.

<!-- elevator end -->

---

Example usage:

```python
import asyncio
from SlyTwitter import *

async def main():

    auth = OAuth1('test/app.json', 'test/user.json')
    twitter = Twitter(auth)

    tweet = await twitter.tweet('Hello, world!')
    follow = await twitter.check_follow('dunkyl_', 'TechConnectify')

    print(tweet)
    print(follow) # @dunkyl_ follows @TechConnectify
    
asyncio.run(main())
```

---

Example CLI usage for getting authorized:

```sh
py -m SlyTwitter v1 scaffold
# ...
py -m SlyTwitter v1 grant
```

Granting credentials requires a Twitter developer account and credentials from their website. Visit [Twitter developers](https://developer.twitter.com/en/portal/dashboard) to get started.
