Skip to main content

Python

Project description

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/*

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

PyHackMD-1.0.2-py3-none-any.whl (3.1 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