跳转到主要内容

GitHub Gist API的Python封装

项目描述

GistAPI.py

这是GitHub Gist API的Python封装。

http://develop.github.com/p/gist.html

示例用法

from gistapi import Gist, Gists

gist = Gist('d4507e882a07ac6f9f92')
gist.description        # 'Example Gist for gist.py'

gist.created_at         # '2010/05/16 10:51:15 -0700'
gist.public             # False
gist.filenames          # ['exampleEmptyFile', 'exampleFile']
gist.files              # {'exampleFile': 'Example file content.', 'exampleEmptyFile': ''}
gist.comments[0].body   # Test Comment.


Gists.fetch_by_user('kennethreitz')[-1].description    # 'My .bashrc configuration'

安装

pip install gistapi

或者,如果您必须

easy_install gistapi

路线图

  • 按引入顺序实现Gist API方法

  • 同时可能使用其他技巧
    • 新Gist方法?(通过网页表单发布?)

  • 可能添加命令行Gist接口

历史

0.2.4 (2011-03-31)

0.2.3 (2011-03-31)

  • 添加Gist评论支持

0.2.2 (2011-01-10)

  • 更新特殊文件名的文件名处理

0.2.1 (2010-09-01)

  • 支持文件字符串IO

  • 添加Pip安装要求

0.2.0 (2010-08-28)

  • 支持添加、重命名、修改和删除文件!

  • 正确的Unicode支持

  • 正确的日期时间支持

  • 改进缓存

  • Urllib2支持

  • 遵守PEP 008/257

  • 为gists添加秘密 .pibb URL属性 :)

  • 其他重构

0.1.4 (2010-08-18)

  • Python 2.5修复

0.1.3 (2010-06-14)

  • Nose-test修复

0.1.2 (2010-05-16)

  • URL生成错误修复

  • 更新版本

  • 元数据重构

  • 通用错误修复

0.1.1 (2010-05-16)

  • PyPi兼容性更改

  • 文档更新

  • 添加文档测试

0.1.0 (2010-05-16)

  • 初始发布

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

gistapi-0.2.4.tar.gz (4.5 kB 查看哈希值)

上传时间 源代码

支持