Byte API Wrapper for Python
Project description
Byte API Wrapper for Python
Python 3.6+ Required.
Attention: This project was built in a weekend (mostly in the weekend that it was launched) as such this is not production level software.
Byte does not have an official web API for developers, and most likely this will violate the ToS. Endpoints were found from the mobile app. As such, this wrapper can break at anytime. Do not rely on this wrapper.
Installation
- PyPi (Recommended)
pip install pybyte - Git repo
git clone https://github.com/ms7m/py-byte cd py-byte python3 setup.py install
Usage
>>> import pybyte
>>> byte = pybyte.Byte(TOKEN)
>>> byte.me().username
'cmmvo22123'
>>>
>>> # View your timeline
>>> byte.me().timeline_feed()
>>> # iterate over your timeline feed
>>> for post in byte.me().timeline_feed().feed:
>>> print(post.caption)
>>> print(post.author)
>>> post.comment("Hey!")
>>> # Set your username/display name/biography
...
>>> byte.me().username = "BotBottyFace220"
>>> byte.me().username
'BotBottyFace220'
>>> # Get Posts
>>> post = byte.get_post("4ZPUKLE5OZB7JJGIBLVMIYQLBU")
>>> post.caption
'@peaks'
>>> post.mentions
[mention1]
# Rebyte/Like posts
>>> post.rebyte()
>>> post.like()
# Comment Posts
>>> post.comment("That's really funny!")
# Upload Posts
>>> byte.upload("sample.mp4", caption="Megan is too funny!")
Example Script
# Go through the global feed, comment and follow the author if they have < 10 followers
global_feed = byte.me().global_feed()
for post in global_feed.feed:
if post.author.followers['followerCount'] > 10:
post.comment("Hey man, thanks for making me laugh!")
post.like()
else:
continue
Example Scripts
# Go through your posts and delete any post older than 3 days
# coming soon.
Tests
Coming soon
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybyte-0.1.6.tar.gz.
File metadata
- Download URL: pybyte-0.1.6.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcac5a743ff1198ac9f5453e48ecef4ec58845435948585fffb32dec289fc397
|
|
| MD5 |
7ff9c3a4d54e328cb724755c80d318b8
|
|
| BLAKE2b-256 |
cb3f9a057786e1ecac894f625b49147646df4af8e5acc32f2bb35cd56c1a4394
|
File details
Details for the file pybyte-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pybyte-0.1.6-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a33d8de746c84b66c5f15b176d77e488637bcea5ba5bcbe4f6ef8d6d1cbeaaa6
|
|
| MD5 |
a25f72ec7a300f91974848da9f1b8677
|
|
| BLAKE2b-256 |
1952c96c55d47541a5e0435ab648294decd607139388eecd6918d911f6211ac7
|