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 details)

Uploaded Python 3

File details

Details for the file PyHackMD-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: PyHackMD-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.4

File hashes

Hashes for PyHackMD-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d844bba4da39f73beff7e33dc7634020fc5f0027b772d898ba7a8dfb40adc4cf
MD5 190cfa2040524e6caf1e0789359a09a4
BLAKE2b-256 fd9c32e68f74e34d5dacff32b5726e227a6579a2fd486c69b648069a3cc857c8

See more details on using hashes here.

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