Skip to main content

Fanfou SDK in Python

Project description

https://travis-ci.org/j178/van.svg?branch=master Documentation Status https://badge.fury.io/py/van.svg https://img.shields.io/badge/python-3.5-blue.svg https://img.shields.io/badge/license-MIT-blue.svg https://badges.gitter.im/fanfou-cli2/Lobby.svg

详细文档请前往 ➔ Readthedocs

Example

from van import Fan, Config


# 1. Subclass the ``Config`` class and offer your configs
class MyConfig(Config):
    consumer_key = 'xxxx'
    consumer_secret = 'xxxx'


# 2. Instancialize the ``Fan`` class
me = Fan.get(MyConfig())
# 3. call methods of ``me``
me.update_status('你好啊,李银河!')

Installation

van 只支持 Python3, 请前往官网下载安装 Python 3.5 以上版本。

如果你是开发者,你也可以帮助我兼容 Python2

之后可以使用 pip 安装:

pip3 install van

或者下载源码安装:

git clone https://github.com/j178/van
cd van
pip3 install . --user

申请应用

要使用 van 你还需要在饭否中申请一个应用:

  1. http://fanfou.com/apps 中创建新应用

  2. 应用名称、主页、描述等信息可以随意填写,如果你想使用 van 的自动 OAuth 认证功能,需要将 Callback URL 填写为 http://localhost:8000/callback

  3. 记录下 Consumer KeyConsumer Secret

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

van-0.0.3.tar.gz (221.7 kB view hashes)

Uploaded Source

Built Distribution

van-0.0.3-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page