Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 1.62 KB

README.md

File metadata and controls

77 lines (59 loc) · 1.62 KB

PyTypecho

PyTypecho Documentation Status

Python Typecho Client (XMLRPC).

Introduction

Requirements

  • Python >= 3.7

Install

pip install pytypecho

Usage

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())

Documents

ReadTheDocs

Status

Functions

  • 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

Others

  • Tests
  • Documentations

License

PyTypecho is released under the MIT License. See LICENSE for more information.