Unofficial Medium Python Flask API and SDK

Overview

PyMedium - Unofficial Medium API

License: MIT PyPI

PyMedium

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 posts
  • GET /{publication_name}/posts - Get publication latest posts
  • GET /top - Get most popular today posts
  • GET /tags/{tag} - Get tagged in popular posts
  • GET /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

  1. Check the open/close issues or open a fresh issue for feature request or bug report with different labels (feature/bug).
  2. Fork this repository on GitHub to start customizing on master or new branch.
  3. Write a test which shows that the feature works as expected or the bug was fixeed.
  4. Send a pull request and wait for code review.

Read more on contributing.

License

Copyright (c) 2017 Engine Bai Licensed under the MIT license.

Comments
  • The API response can't get the whole post URL

    The API response can't get the whole post URL

    {
        "26594f13f9f7": {
            "acceptedAt": 0,
            "allowResponses": true,
            "approvedHomeCollectionId": "275e26e7c1b2",
            "canonicalUrl": "",
            "content": {
                "postDisplay": {
                    "coverless": true
                },
                "subtitle": "最近聊天機器人Bot這股趨勢才慢慢要崛起,之前做了一點觀察紀錄,這次進入實作階段,首先就直接使用Facebook Message Platform做為開始。"
            },
            "coverless": true,
            "createdAt": 1463114334145,
            "creatorId": "3301d32a6bba",
            "detectedLanguage": "zh-Hant",
            "displayAuthor": "",
            "experimentalCss": "",
            "firstPublishedAt": 1463362614400,
            "hasUnpublishedEdits": false,
            "homeCollectionId": "275e26e7c1b2",
            "id": "26594f13f9f7",
            "importedPublishedAt": 0,
            "importedUrl": "",
            "inResponseToMediaResourceId": "",
            "inResponseToPostId": "",
            "inResponseToRemovedAt": 0,
            "isApprovedTranslation": false,
            "isRequestToPubDisabled": false,
            "isSeries": false,
            "isSponsored": false,
            "isSubscriptionLocked": false,
            "isTitleSynthesized": true,
            "latestPublishedAt": 1464044751035,
            "latestPublishedVersion": "a9cd5e24bc87",
            "latestRev": 1003,
            "latestVersion": "a9cd5e24bc87",
            "license": 0,
            "mediumUrl": "",
            "migrationId": "",
            "newsletterId": "",
            "notifyFacebook": false,
            "notifyFollowers": true,
            "notifyTwitter": false,
            "previewContent": {
                "bodyModel": {
                    "paragraphs": [
                        {
                            "alignment": 1,
                            "markups": [],
                            "name": "85d4",
                            "text": "用Python開發Facebook Bot",
                            "type": 3
                        },
                        {
                            "alignment": 1,
                            "markups": [
                                {
                                    "anchorType": 0,
                                    "end": 31,
                                    "href": "https://medium.com/dualcores-studio/聊天機器人的產業觀察紀錄-cdd9d993d46b#.nlzbroahg",
                                    "rel": "",
                                    "start": 27,
                                    "title": "",
                                    "type": 3
                                },
                                {
                                    "anchorType": 0,
                                    "end": 73,
                                    "href": "https://developers.facebook.com/docs/messenger-platform",
                                    "rel": "",
                                    "start": 48,
                                    "title": "",
                                    "type": 3
                                }
                            ],
                            "name": "65ce",
                            "text": "最近聊天機器人Bot這股趨勢才慢慢要崛起,之前做了一點觀察紀錄,這次進入實作階段,首先就直接使用Facebook Message Platform做為開始。",
                            "type": 1
                        },
                        {
                            "layout": 9,
                            "markups": [
                                {
                                    "anchorType": 0,
                                    "end": 46,
                                    "href": "https://messengerplatform.fb.com",
                                    "rel": "nofollow",
                                    "start": 14,
                                    "title": "",
                                    "type": 3
                                }
                            ],
                            "metadata": {
                                "id": "1*FaXmJ1pHvSc55lwckZxKuQ.png",
                                "originalHeight": 698,
                                "originalWidth": 1278
                            },
                            "name": "af96",
                            "text": "",
                            "type": 4
                        }
                    ],
                    "sections": [
                        {
                            "startIndex": 0
                        }
                    ]
                },
                "isFullContent": false
            },
            "responseHiddenOnParentPostAt": 0,
            "slug": "用python開發facebook-bot",
            "title": "用Python開發Facebook Bot",
            "translationSourceCreatorId": "",
            "translationSourcePostId": "",
            "type": "Post",
            "uniqueSlug": "用python開發facebook-bot-26594f13f9f7",
            "updatedAt": 1467813266572,
            "versionId": "a9cd5e24bc87",
            "virtuals": {
                "allowNotes": true,
                "imageCount": 11,
                "isBookmarked": false,
                "isLockedPreviewOnly": false,
                "links": {
                    "entries": [
                        {
                            "alts": [
                                {
                                    "type": 2,
                                    "url": "medium://p/cdd9d993d46b"
                                },
                                {
                                    "type": 3,
                                    "url": "medium://p/cdd9d993d46b"
                                }
                            ],
                            "url": "https://medium.com/dualcores-studio/%E8%81%8A%E5%A4%A9%E6%A9%9F%E5%99%A8%E4%BA%BA%E7%9A%84%E7%94%A2%E6%A5%AD%E8%A7%80%E5%AF%9F%E7%B4%80%E9%8C%84-cdd9d993d46b#.nlzbroahg"
                        },
                        {
                            "alts": [
                                {
                                    "type": 2,
                                    "url": "medium://dualcores-studio"
                                },
                                {
                                    "type": 3,
                                    "url": "medium://dualcores-studio"
                                }
                            ],
                            "url": "http://dual-cores.com"
                        }
                    ],
                    "generatedAt": 1471975490664,
                    "version": "0.3"
                },
                "metaDescription": "",
                "previewImage": {
                    "backgroundSize": "",
                    "filter": "",
                    "height": 0,
                    "imageId": "1*FaXmJ1pHvSc55lwckZxKuQ.png",
                    "originalHeight": 698,
                    "originalWidth": 1278,
                    "strategy": "resample",
                    "width": 0
                },
                "publishedInCount": 1,
                "readingTime": 2.349056603773585,
                "recommends": 32,
                "responsesCreatedCount": 3,
                "socialRecommendsCount": 0,
                "statusForCollection": "APPROVED",
                "subtitle": "最近聊天機器人Bot這股趨勢才慢慢要崛起,之前做了一點觀察紀錄,這次進入實作階段,首先就直接使用Facebook Message Platform做為開始。",
                "tags": [
                    {
                        "metadata": {
                            "coverImage": {
                                "id": "1*wybYEzkMts0D1BloD1vH4A.png",
                                "originalHeight": 1244,
                                "originalWidth": 3000
                            },
                            "followerCount": 2509,
                            "postCount": 5078
                        },
                        "name": "Bots",
                        "postCount": 5078,
                        "slug": "bots",
                        "type": "Tag",
                        "virtuals": {
                            "isFollowing": false
                        }
                    },
                    {
                        "metadata": {
                            "coverImage": {
                                "id": "1*wybYEzkMts0D1BloD1vH4A.png",
                                "originalHeight": 1244,
                                "originalWidth": 3000
                            },
                            "followerCount": 165,
                            "postCount": 893
                        },
                        "name": "Facebook Messenger",
                        "postCount": 893,
                        "slug": "facebook-messenger",
                        "type": "Tag",
                        "virtuals": {
                            "isFollowing": false
                        }
                    },
                    {
                        "metadata": {
                            "coverImage": {
                                "id": "1*nAr_UQ1RcT-2mcfstPLocQ.jpeg",
                                "originalHeight": 750,
                                "originalWidth": 1061
                            },
                            "followerCount": 4668,
                            "postCount": 3793
                        },
                        "name": "Python",
                        "postCount": 3793,
                        "slug": "python",
                        "type": "Tag",
                        "virtuals": {
                            "isFollowing": false
                        }
                    }
                ],
                "takeoverId": "",
                "totalClapCount": 0,
                "usersBySocialRecommends": [],
                "wordCount": 278
            },
            "visibility": 0,
            "vote": false,
            "webCanonicalUrl": ""
        }
    }
    
    bug 
    opened by enginebai 2
  • Failed to import required modules in sdk

    Failed to import required modules in sdk

    >>> from PyMedium.medium import Medium
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/enginebai/tmp/med/env/lib/python3.5/site-packages/PyMedium/medium.py", line 5, in <module>
        import requests
    ImportError: No module named 'requests'
    
    bug 
    opened by enginebai 1
  • Convert gist to code block

    Convert gist to code block

    2016-12-13 11 37 51

    to

    private double convertTouchEventPointToAngle(float xPos, float yPos) {
    	// transform touch coordinate into component coordinate
    	float x = xPos - mTranslateX;
    	float y = yPos - mTranslateY;
    
    	x = (mClockwise) ? x : -x;
    	double angle = Math.toDegrees(Math.atan2(y, x) + (Math.PI / 2));
    	angle = (angle < 0) ? (angle + 360) : angle;
    	return angle;
    }
    
    feature 
    opened by enginebai 0
  • Bump jinja2 from 2.9.5 to 2.11.3

    Bump jinja2 from 2.9.5 to 2.11.3

    Bumps jinja2 from 2.9.5 to 2.11.3.

    Release notes

    Sourced from jinja2's releases.

    2.11.3

    This contains a fix for a speed issue with the urlize filter. urlize is likely to be called on untrusted user input. For certain inputs some of the regular expressions used to parse the text could take a very long time due to backtracking. As part of the fix, the email matching became slightly stricter. The various speedups apply to urlize in general, not just the specific input cases.

    2.11.2

    2.11.1

    This fixes an issue in async environment when indexing the result of an attribute lookup, like {{ data.items[1:] }}.

    2.11.0

    This is the last version to support Python 2.7 and 3.5. The next version will be Jinja 3.0 and will support Python 3.6 and newer.

    2.10.3

    2.10.2

    2.10.1

    2.10

    Primary changes

    Install or upgrade

    Install from PyPI with pip:

    ... (truncated)

    Changelog

    Sourced from jinja2's changelog.

    Version 2.11.3

    Released 2021-01-31

    • Improve the speed of the urlize filter by reducing regex backtracking. Email matching requires a word character at the start of the domain part, and only word characters in the TLD. :pr:1343

    Version 2.11.2

    Released 2020-04-13

    • Fix a bug that caused callable objects with __getattr__, like :class:~unittest.mock.Mock to be treated as a :func:contextfunction. :issue:1145
    • Update wordcount filter to trigger :class:Undefined methods by wrapping the input in :func:soft_str. :pr:1160
    • Fix a hang when displaying tracebacks on Python 32-bit. :issue:1162
    • Showing an undefined error for an object that raises AttributeError on access doesn't cause a recursion error. :issue:1177
    • Revert changes to :class:~loaders.PackageLoader from 2.10 which removed the dependency on setuptools and pkg_resources, and added limited support for namespace packages. The changes caused issues when using Pytest. Due to the difficulty in supporting Python 2 and :pep:451 simultaneously, the changes are reverted until 3.0. :pr:1182
    • Fix line numbers in error messages when newlines are stripped. :pr:1178
    • The special namespace() assignment object in templates works in async environments. :issue:1180
    • Fix whitespace being removed before tags in the middle of lines when lstrip_blocks is enabled. :issue:1138
    • :class:~nativetypes.NativeEnvironment doesn't evaluate intermediate strings during rendering. This prevents early evaluation which could change the value of an expression. :issue:1186

    Version 2.11.1

    Released 2020-01-30

    • Fix a bug that prevented looking up a key after an attribute ({{ data.items[1:] }}) in an async template. :issue:1141

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump werkzeug from 0.11.15 to 0.15.3

    Bump werkzeug from 0.11.15 to 0.15.3

    Bumps werkzeug from 0.11.15 to 0.15.3.

    Release notes

    Sourced from werkzeug's releases.

    0.15.3

    • Blog: https://palletsprojects.com/blog/werkzeug-0-15-3-released/
    • Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/#version-0-15-3

    0.15.2

    • Blog: https://palletsprojects.com/blog/werkzeug-0-15-2-released/
    • Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/#version-0-15-2

    0.15.1

    • Blog: https://palletsprojects.com/blog/werkzeug-0-15-1-released/
    • Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/

    0.15.0

    • Blog: https://palletsprojects.com/blog/werkzeug-0-15-0-released/
    • Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/

    0.13

    Read the announcement here.

    Read the full changelog.

    Install from PyPI with pip:

    pip install -U Werkzeug
    
    Changelog

    Sourced from werkzeug's changelog.

    Version 0.15.3

    Released 2019-05-14

    • Properly handle multi-line header folding in development server in Python 2.7. (:issue:1080)
    • Restore the response argument to :exc:~exceptions.Unauthorized. (:pr:1527)
    • :exc:~exceptions.Unauthorized doesn't add the WWW-Authenticate header if www_authenticate is not given. (:issue:1516)
    • The default URL converter correctly encodes bytes to string rather than representing them with b''. (:issue:1502)
    • Fix the filename format string in :class:~middleware.profiler.ProfilerMiddleware to correctly handle float values. (:issue:1511)
    • Update :class:~middleware.lint.LintMiddleware to work on Python 3. (:issue:1510)
    • The debugger detects cycles in chained exceptions and does not time out in that case. (:issue:1536)
    • When running the development server in Docker, the debugger security pin is now unique per container.

    Version 0.15.2

    Released 2019-04-02

    • Rule code generation uses a filename that coverage will ignore. The previous value, "generated", was causing coverage to fail. (:issue:1487)
    • The test client removes the cookie header if there are no persisted cookies. This fixes an issue introduced in 0.15.0 where the cookies from the original request were used for redirects, causing functions such as logout to fail. (:issue:1491)
    • The test client copies the environ before passing it to the app, to prevent in-place modifications from affecting redirect requests. (:issue:1498)
    • The "werkzeug" logger only adds a handler if there is no handler configured for its level in the logging chain. This avoids double logging if other code configures logging first. (:issue:1492)

    Version 0.15.1

    Released 2019-03-21

    • :exc:~exceptions.Unauthorized takes description as the first
    ... (truncated)
    Commits
    • 9b1123a release version 0.15.3
    • 00bc43b unique debugger pin in Docker containers
    • 2cbdf2b Merge pull request #1542 from asottile/exceptions_arent_always_hashable
    • 0e669f6 Fix unhashable exception types
    • bdc17e4 Merge pull request #1540 from pallets/break-tb-cycle
    • 44e38c2 break cycle in chained exceptions
    • 777500b Merge pull request #1518 from NiklasMM/fix/1510_lint-middleware-python3-compa...
    • e00c7c2 Make LintMiddleware Python 3 compatible and add tests
    • d590cc7 Merge pull request #1539 from pallets/profiler-format
    • 0388fc9 update filename_format for ProfilerMiddleware.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump flask from 0.12 to 1.0

    Bump flask from 0.12 to 1.0

    Bumps flask from 0.12 to 1.0.

    Release notes

    Sourced from flask's releases.

    1.0

    The Pallets team is pleased to release Flask 1.0. [Read the announcement on our blog.](https://www.palletsprojects.com/blog/flask-1-0-released/

    There are over a year's worth of changes in this release. Many features have been improved or changed. Read the changelog to understand how your project's code will be affected.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Install or Upgrade

    Install from PyPI with pip:

    pip install -U Flask
    

    0.12.4

    This is a repackage of 0.12.3 to fix an issue with how the package was built.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.4'
    

    0.12.3

    This release includes an important security fix for JSON and a minor backport for CLI support in PyCharm. It is provided for projects that cannot update to Flask 1.0 immediately. See the 1.0 announcement and update to it instead if possible.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.3'
    
    ... (truncated)
    Changelog

    Sourced from flask's changelog.

    Version 1.0

    Released 2018-04-26

    • Python 2.6 and 3.3 are no longer supported.
    • Bump minimum dependency versions to the latest stable versions: Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1. :issue:2586
    • Skip :meth:app.run <Flask.run> when a Flask application is run from the command line. This avoids some behavior that was confusing to debug.
    • Change the default for :data:JSONIFY_PRETTYPRINT_REGULAR to False. :func:~json.jsonify returns a compact format by default, and an indented format in debug mode. :pr:2193
    • :meth:Flask.__init__ <Flask> accepts the host_matching argument and sets it on :attr:~Flask.url_map. :issue:1559
    • :meth:Flask.__init__ <Flask> accepts the static_host argument and passes it as the host argument when defining the static route. :issue:1559
    • :func:send_file supports Unicode in attachment_filename. :pr:2223
    • Pass _scheme argument from :func:url_for to :meth:~Flask.handle_url_build_error. :pr:2017
    • :meth:~Flask.add_url_rule accepts the provide_automatic_options argument to disable adding the OPTIONS method. :pr:1489
    • :class:~views.MethodView subclasses inherit method handlers from base classes. :pr:1936
    • Errors caused while opening the session at the beginning of the request are handled by the app's error handlers. :pr:2254
    • Blueprints gained :attr:~Blueprint.json_encoder and :attr:~Blueprint.json_decoder attributes to override the app's encoder and decoder. :pr:1898
    • :meth:Flask.make_response raises TypeError instead of ValueError for bad response types. The error messages have been improved to describe why the type is invalid. :pr:2256
    • Add routes CLI command to output routes registered on the application. :pr:2259
    • Show warning when session cookie domain is a bare hostname or an IP address, as these may not behave properly in some browsers, such as Chrome. :pr:2282
    • Allow IP address as exact session cookie domain. :pr:2282
    • SESSION_COOKIE_DOMAIN is set if it is detected through SERVER_NAME. :pr:2282
    • Auto-detect zero-argument app factory called create_app or make_app from FLASK_APP. :pr:2297
    • Factory functions are not required to take a script_info parameter to work with the flask command. If they take a single parameter or a parameter named script_info, the
    ... (truncated)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump requests from 2.12.3 to 2.20.0

    Bump requests from 2.12.3 to 2.20.0

    Bumps requests from 2.12.3 to 2.20.0.

    Changelog

    Sourced from requests's changelog.

    2.20.0 (2018-10-18)

    Bugfixes

    • Content-Type header parsing is now case-insensitive (e.g. charset=utf8 v Charset=utf8).
    • Fixed exception leak where certain redirect urls would raise uncaught urllib3 exceptions.
    • Requests removes Authorization header from requests redirected from https to http on the same hostname. (CVE-2018-18074)
    • should_bypass_proxies now handles URIs without hostnames (e.g. files).

    Dependencies

    • Requests now supports urllib3 v1.24.

    Deprecations

    • Requests has officially stopped support for Python 2.6.

    2.19.1 (2018-06-14)

    Bugfixes

    • Fixed issue where status_codes.py's init function failed trying to append to a __doc__ value of None.

    2.19.0 (2018-06-12)

    Improvements

    • Warn user about possible slowdown when using cryptography version < 1.3.4
    • Check for invalid host in proxy URL, before forwarding request to adapter.
    • Fragments are now properly maintained across redirects. (RFC7231 7.1.2)
    • Removed use of cgi module to expedite library load time.
    • Added support for SHA-256 and SHA-512 digest auth algorithms.
    • Minor performance improvement to Request.content.
    • Migrate to using collections.abc for 3.7 compatibility.

    Bugfixes

    • Parsing empty Link headers with parse_header_links() no longer return one bogus entry.
    ... (truncated)
    Commits
    • bd84045 v2.20.0
    • 7fd9267 remove final remnants from 2.6
    • 6ae8a21 Add myself to AUTHORS
    • 89ab030 Use comprehensions whenever possible
    • 2c6a842 Merge pull request #4827 from webmaven/patch-1
    • 30be889 CVE URLs update: www sub-subdomain no longer valid
    • a6cd380 Merge pull request #4765 from requests/encapsulate_urllib3_exc
    • bbdbcc8 wrap url parsing exceptions from urllib3's PoolManager
    • ff0c325 Merge pull request #4805 from jdufresne/https
    • b0ad249 Prefer https:// for URLs throughout project
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Fail to install PyMedium on Windows

    Fail to install PyMedium on Windows

    When I tried to use pip to install PyMedium, I got the error of:

    Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\JIAHAO~1\AppData\Local\Temp\pip-install-b7ntnfmk\PyMedium\setup.py", line 12, in long_description=open('README', 'r').read(), File "c:\users\jiahaocai\appdata\local\programs\python\python37\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2382: character maps to

    I think the problem could be there is some Chinese in the README file. Hope you could help check this problem and fix it. Thanks so much!

    opened by caijiah 0
Owner
Engine Bai
Developer, Athlete, Learner.
Engine Bai
Graviti-python-sdk - Graviti Data Platform Python SDK

Graviti Python SDK Graviti Python SDK is a python library to access Graviti Data

Graviti 13 Dec 15, 2022
A project that automatically sends you a Medium article on a topic of your choosing to your email address daily.

Daily Article from Medium ✏️ About A project that automatically sends you a Medium article on a topic of your choosing to your email address daily. No

Orhan Emre Dikicigil 2 Apr 27, 2022
An API wrapper for Henrik's Unofficial VALORANT API

ValorantAPI.py An API wrapper for Henrik's Unofficial VALORANT API Warning!! This project is still in beta and only contains barely anything yet. If y

Jakkaphat Chalermphanaphan 0 Feb 4, 2022
This package accesses nitrotype's official api along with its unofficial user api

NitrotypePy This package accesses nitrotype's official api along with its unofficial user api. Currently still in development. Install To install, run

The Moon That Rises 2 Sep 4, 2022
Python SDK for Facebook's Graph API

Facebook Python SDK This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical

Mobolic 2.7k Jan 7, 2023
The Official Dropbox API V2 SDK for Python

The offical Dropbox SDK for Python. Documentation can be found on Read The Docs. Installation Create an app via the Developer Console. Install via pip

Dropbox 828 Jan 5, 2023
Python SDK for the Buycoins API.

This library provides easy access to the Buycoins API using the Python programming language. It provides all the feature of the API so that you don't need to interact with the API directly. This library can be used with Python 3.6+

Musa Rasheed 48 May 4, 2022
qualysclient - a python SDK for interacting with the Qualys API

qualysclient - a python SDK for interacting with the Qualys API

null 5 Oct 28, 2022
A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API.

A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.

Marcelo Moreira de Mello 176 Dec 21, 2022
An Python SDK for QQ based on mirai-api-http v2.

Argon 一个基于 graia-broadcast 和 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 The Stasis / 停滞 为维持 GraiaProject

BlueGlassBlock 1 Oct 29, 2021
An elegant mirai-api-http v2 Python SDK.

Ariadne 一个适用于 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 安装 poetry add graia-ariadne 或 pip install graia

Graia Project 259 Jan 2, 2023
Python SDK for accessing the Hanko Authentication API

Hanko Authentication SDK for Python This package is maintained by Hanko. Contents Introduction Documentation Installation Usage Prerequisites Create a

Hanko.io 3 Mar 8, 2022
Balsam Python client API & SDK

balsam No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This Python package is automatically

Darren Govoni 1 Oct 22, 2021
Python SDK for interacting with the Frame.io API.

python-frameio-client Frame.io Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time,

Frame.io 37 Dec 21, 2022
DongTai API SDK For Python

DongTai-SDK-Python Quick start You need a config file config.json { "DongTai":{ "token":"your token", "url":"http://127.0.0.1:90"

huoxian 50 Nov 24, 2022
Python 3 SDK/Wrapper for Huobi Crypto Exchange Api

This packages intents to be an idiomatic PythonApi wrapper for https://www.huobi.com/ Huobi Api Doc: https://huobiapi.github.io/docs Showcase TODO Con

null 3 Jul 28, 2022
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.

Instagram-API-python Unofficial Instagram API to give you access to ALL Instagram features (like, follow, upload photo and video, etc)! Written in Pyt

Vladimir Bezrukov 1 Nov 19, 2021
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Harun Mbaabu Mwenda 46 Sep 1, 2022