Python Typecho Client (XMLRPC).
- Python >= 3.7
pip install pytypecho
from pytypecho import Typecho
te = Typecho('http://127.0.0.1/index.php/action/xmlrpc', username='admin', password='admin')
print(te.get_posts())
or
import asyncio
from pytypecho import AsyncTypecho
async def main():
te = AsyncTypecho('http://127.0.0.1/index.php/action/xmlrpc', username='admin', password='admin', semaphore=4)
print(await te.get_posts())
asyncio.run(main())
- Post
- get Post/Posts
- new Post (Not fully tested!)
- edit Post
- delete Post
- Page
- get Page/Pages
- new Page (Not fully tested!)
- edit Page
- delete Page
- Category
- get Categories
- new Category (Not work on typecho >= 1.2)
- delete Category
- Tag
- get Tags
- Attachment
- get attachment/attachments
- new attachment
- Comment
- get comment/comments
- new comment
- edit comment
- delete comment
- Tests
- Documentations
PyTypecho is released under the MIT License. See LICENSE for more information.