The social ethosa library for Python
Project description
social ethosa
A Python library that uses requests
Get started
Installation: pip install --upgrade social-ethosa
Import:
from social_ethosa import *
Vkcom
vk = Vk(token="Your token is here", group_id=12345, debug=True, lang="en")
# the group_id parameter should be used if you are going to log in through a group.
# In this example, we will use group authorization.
@vk.on_message_new
# This decorator is an event handler that executes the function passed to it on a new message
# The decorator's name is taken from the official names, but with the prefix " on_"
# https://vk.com/dev/groups_events
def getMessage(message):
text = message.text
peer_id = message.peer_id
from_id = message.from_id
attachments = message.attachments
using the file Uploader:
vk.uploader.getUploadUrl("message_photo") # getting a link to upload files
# you can also pass other arguments (argument=value)
# to get the rest of the UploadUrl names, use the function
# uploader.getAllTypes
upload files:
response = vk.uploader.uploadFile("path") # you can also pass other arguments (argument=value)
Some audio methods are also available in my library:
login = "89007003535"
password = "qwertyuiop"
audio = Audio(login=login, password=password, debug=1)
audios = audio.get() # Since the audio methods are not available in the official API, I had to make a parser of the site
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
social-ethosa-0.2.11.tar.gz
(20.4 kB
view hashes)
Built Distribution
Close
Hashes for social_ethosa-0.2.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1cba5eb1428f66054ee16a2addbdcdfbed4a611f8f280b8a322b334180fe259 |
|
MD5 | 25502ae5a69bac7d441bbb5f8c5360b7 |
|
BLAKE2b-256 | da54e6a0cd6d61ca0b90864f3f1125a50c2a3ed24ad358638d095619c20eeac8 |