Git Product home page Git Product logo

pytypecho's Introduction

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.

pytypecho's People

Contributors

veoco avatar yirami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pytypecho's Issues

获取POST报错

调用get_post提示文章不存在,我博客不存在post_id=1的post,应该是传参有问题

发布文章的时候如何带上标签?

post = Post(title=‘测试标题’, categories = ['默认分类'],slug='标签1',description=‘测试内容1’) te.new_post(post, publish=True)
我试了下这样好像不行~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.