PyHackMD

Python


License
MIT
Install
pip install PyHackMD==1.0.2

Documentation

Introduction

This is the python interface of HackMD API.

Getting Start

prerequists

  1. Python (version free)
  2. HackMD Token: please see official website to get the token.

Installation

pip install PyHackMD

API Interface

  1. Get Note list
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.get_note_list()
pprint(data)
  1. Get Note Content
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.get_note('<note_id>')
pprint(data)
  1. Create Note
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.create_note(title="Test Create Note")
pprint(data)
  1. Update Note
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.update_note("<note_id>", content="# Test Update Note")
pprint(data)
  1. Delete Note
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.delete_note("<note_id>")
pprint(data)
  1. Get Note Read History
from PyHackMD import API
from pprint import pprint
api = API('<token>')
data = api.get_note_read_history()
pprint(data)

Build & Upload

  1. change version in setup.py

  2. Build wheel

python setup.py bdist_wheel
  1. Upload to pypi
twine upload dist/PyHackMD-1.0.2-py3-none-any.whl

Version Note

1.0.2

  1. add Introduction in README.md

1.0.1

  1. add url in setup.py
  2. add installation method in README.md

1.0.0

First Release