Description
Unofficial Medium Python Flask API and SDK
PyMedium alternatives and similar packages
Based on the "Flask" category.
Alternatively, view PyMedium alternatives based on common mentions on social networks and blogs.
-
Flask RestPlus
Fully featured framework for fast, easy and documented API development with Flask -
pycord
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API -
flask-restless
NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models. -
apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification).. -
Flask Google Maps
Easy way to add GoogleMaps to Flask applications. maintainer: @getcake -
PEP 8 Speaks
A GitHub :octocat: app to automatically review Python code style over Pull Requests -
flask_for_startups
Flask boilerplate using a services oriented structure -
Flask-Diamond
:gem: Flask-Diamond is a batteries-included Flask framework. -
discord-interactions-python
Useful tools for building interactions in Python -
#<Sawyer::Resource:0x00007f160f191eb0>
Python package for webscraping in Natural language -
flask-api-utils
Flask extension that takes care of API representation and authentication. -
Cilantropy
:four_leaf_clover: Cilantropy is a Python Package Manager interface created to provide an "easy-to-use" visual and also a command-line interface for Pythonistas. Works great on windows, linux, macos :star: -
Flask-FileAlchemy
YAML-formatted plain-text file based models for Flask backed by Flask-SQLAlchemy -
Burrowkv
Burrowkv is a simple key-value store implementation in Python -
Apprentice
Built for streamlining development of Google Assistant Actions -
Flask-RESTX-boilerplate
The boilerplate for the project using restful Flask-RESTX framework
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PyMedium or a related project?
README
PyMedium - Unofficial Medium API
PyMedium is an unofficial Medium API written in python flask. It provides developers to access to user, post list and detail information from Medium website. This is a read-only API to access public information from Medium, you can customize this API to fit your requirements and deploy on your own server.
Installation
Before running PyMedium API, you have to clone the code from this repository, install requirements at first.
$ git clone [email protected]:enginebai/PyMedium.git
$ cd PyMedium
$ pip install -r requirements.txt
Then download web driver to driver
folder from Selenium or via the command-line with curl
(update {VERSION}
with the latest version code and {OS}
with your server operating system.
$ mkdir driver | cd driver
$ curl -O https://chromedriver.storage.googleapis.com/{VERSION}/chromedriver_{OS}.zip
$ unzip chromedriver_{OS}.zip
Usage
To run this API application, use the flask
command as same as Flask Quickstart
$ export FLASK_APP=./pymedium/api.py
$ export FLASK_DEBUG=1 ## if you run in debug mode.
$ flask run
* Running on http://localhost:5000/
Documentation
Users
GET /@{username}
- Get user profile
Response
{
"avatar": "1*Y7zH0UM975YmchIO86uIGA.jpeg",
"bio": "Mixtape of developer, designer and startup. Cofounder and developer of DualCores Studio. Follow my technical blog: http://enginebai.logdown.com/",
"display_name": "Engine Bai",
"facebook": "789985027713671",
"followedby_count": 445,
"following_count": 238,
"publications": [
{
"creator_user_id": "3301d32a6bba",
"description": "Stories from the mix of designer and developer. 設計與工程的交織,混搭激盪出不同的想像。",
"display_name": "DualCores Studio",
"follower_count": 302,
"image": {
"image_id": "1*DLixNgsMpK5B74na3EDucQ.png",
"original_height": 591,
"original_width": 591
},
"logo": {
"image_id": "1*DLixNgsMpK5B74na3EDucQ.png",
"original_height": 591,
"original_width": 591
},
"name": "dualcores-studio",
"post_count": 0,
"publication_id": "275e26e7c1b2",
"url": "https://medium.com/dualcores-studio"
},
...more
],
"twitter": "enginebai",
"user_id": "3301d32a6bba",
"username": "enginebai"
}
Publication
GET /{publication_name}
- Get publication profile
{
"creator_user_id": "3301d32a6bba",
"description": "Stories from the mix of designer and developer. 設計與工程的交織,混搭激盪出不同的想像。",
"display_name": "DualCores Studio",
"follower_count": 302,
"image": {
"image_id": "1*DLixNgsMpK5B74na3EDucQ.png",
"original_height": 591,
"original_width": 591
},
"logo": {
"image_id": "1*DLixNgsMpK5B74na3EDucQ.png",
"original_height": 591,
"original_width": 591
},
"name": "dualcores-studio",
"post_count": 0,
"publication_id": "275e26e7c1b2",
"url": "https://medium.com/dualcores-studio"
}
Post
GET /@{username}/posts
- Get user latest postsGET /{publication_name}/posts
- Get publication latest postsGET /top
- Get most popular today postsGET /tags/{tag}
- Get tagged in popular postsGET /tags/{tag}/latest
- Get tagged in latest posts
Parameters
Name | Type | Description |
---|---|---|
n | integer | The count of posts to return. Default is 10. |
Response
[
{
"image_count": 14,
"post_date": 1478533474858,
"post_id": "99a3d86df228",
"preview_image": {
"image_id": "1*zhnQJhNzp-Oal1-GU1EUKw.png",
"original_height": 412,
"original_width": 608
},
"read_time": 7.74811320754717,
"recommend_count": 351,
"response_count": 10,
"title": "Make an android custom view, publish and open source.",
"url": "https://medium.com/dualcores-studio/make-an-android-custom-view-publish-and-open-source-99a3d86df228",
"word_count": 1669
},
...more
]
Post detail
GET /post
- Get the post content
Parameters
Name | Type | Description |
---|---|---|
u | string | The post url to parse content. |
format | string | (optional) The format of response, the value could be text , html , md , json , default is text . |
Response
## Simple text, json, html, markdown format
Issues
Feel free to submit bug reports or feature requests and make sure you read the contribution guideline before opening any issue.
Contributing
- Check the open/close issues or open a fresh issue for feature request or bug report with different labels (
feature
/bug
). - Fork this repository on GitHub to start customizing on master or new branch.
- Write a test which shows that the feature works as expected or the bug was fixeed.
- Send a pull request and wait for code review.
[Read more on contributing](./CONTRIBUTING.md).
License
Copyright (c) 2017 Engine Bai Licensed under the MIT license.
*Note that all licence references and agreements mentioned in the PyMedium README section above
are relevant to that project's source code only.