Wikidot Utility Library
Project description
wikidot.py - A Python library for making requests to the Wikidot sites.
Installation
pip install wikidot
Usage
[!NOTE] You can use this library without logging in, but you can only use the features that do not require logging in.
import wikidot
# Create a new Client class and logging in with the credentials of your wikidot account
# If you don't want to log in : with wikidot.Client() as client:
with wikidot.Client(username='input-your-name', password='input-your-password') as client:
# ------
# user features
# ------
# Get the user object of the user
user = client.user.get('input-a-username')
# Bulk execution by asynchronous request
users = client.user.get_bulk(['input-a-username', 'input-another-username'])
# ------
# site features
# ------
# Get the site object of the SCP Foundation
site = client.site.get('scp-wiki')
# invite a user to the site
site.invite_user(user)
# Get all unprocessed applications for the site
applications = site.get_applications()
# process an application
for application in applications:
application.accept()
# or
application.reject()
# ------
# private message features
# ------
# Get messages in your inbox
received_messages = client.private_message.get_inbox()
# Get messages in your sent box
sent_messages = client.private_message.get_sentbox()
# Get message by id
# NOTE: You can only get the message that you have received or sent
message = client.private_message.get(123456)
# Bulk execution by asynchronous request
messages = client.private_message.get_messages([123456, 123457])
# Send a message to a user
client.private_message.send(
recipient=user,
subject='Hello',
body='Hello, world!'
)
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
wikidot-3.0.0a2.tar.gz
(21.9 kB
view hashes)
Built Distribution
wikidot-3.0.0a2-py3-none-any.whl
(28.9 kB
view hashes)
Close
Hashes for wikidot-3.0.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a36ce0a3c0c6bb2c3dfc7ae96a25c032a6572c8df2ab6b555bf25f3629918a75 |
|
MD5 | ff1d09431d73c9fd05677885f88b0760 |
|
BLAKE2b-256 | 68395add3d5ce5e99ddea297352886942187be4fe8e1ae9d795f4b9fa3ab7084 |