A python implementation of the Tilda API
Project description
Tilda API
A python implementation of Tilda API
Getting Started
The project provides full access to Tilda.cc API via an object-oriented Python interface using dataclasses.
Installation
Use the package manager pip to install package.
pip install tilda-wrapper-api
Use the package manager pipenv to install package.
pipenv install tilda-wrapper-api
Usage
# Standard libraries
import os
# Project
from tilda_wrapper_api.client import Client
# create a client object, default value secret=os.getenv('SECRET') and public=os.getenv('PUBLIC')
client = Client()
# get list of projects
projects = client.get_projects_list()
print(projects)
# get project information
project = client.get_project(projects.result[0].id)
print(project)
# get project information for export
project_export = client.get_project_export(projects.result[0].id)
print(project_export)
# get list of pages in the project
pages = client.get_pages_list(projects.result[0].id)
print(pages)
# get information about the page (+ body html-code)
page = client.get_page(pages.result[0].id)
print(page)
# get information about the page (+ full page html-code)
page_full = client.get_page_full(pages.result[0].id)
print(page_full)
# get information about the page for export (+ body html-code)
page_export = client.get_page_export(pages.result[0].id)
print(page_export)
# get information about the page for export (+ full page html-code)
page_full_export = client.get_page_full_export(pages.result[0].id)
print(page_full_export)
Built With
- Requests - Python HTTP Requests for Humans™
- dataclasses-json - Library provides a simple API for encoding and decoding dataclasses to and from JSON
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Authors
- Sergey Ozeranskiy - Initial work - ozeranskiy
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
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
tilda_wrapper_api-0.1.4.tar.gz
(13.2 kB
view hashes)
Built Distribution
Close
Hashes for tilda_wrapper_api-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97278ae4bfc972ef6be0982faa5c648be77422f42eefbafa616b0b482ac13ded |
|
MD5 | 3aaf5f37695e43a3abd720f2dee49521 |
|
BLAKE2b-256 | 0c33d71a4714a43149faafc798cf883bfae554661de51333c124646661b8c113 |