Skip to main content

Generator a github card for flask web application

Project description

flask-githubcard

A flask's extension to generate a github card for yourself.

中文文档

Quick Start

pip install flask-githubcard

Step 1: Initial the extension

from flask import Flask
from flask_githubcard import GithubCard
app = Flask(__name__)
githubcard = GithubCard(app)

Step 2: In your <head> section of your base template add the following code:

<head>
    {{githubcard.init_css()}}
    {{githubcard.init_js()}}
</head>

Step 3: Render the github card in your template.

<div>
    {{githubcard.generate_card()}}
</div>

Open your browser and visit your web page, github card like bellow here:

1623293427414.png

Advanced

Configure yourself github info

from flask import Flask
from flask_githubcard import GithubCard
app = Flask(__name__)

githubcard = GithubCard(app)
app.config['GITHUB_USERNAME'] = 'weijiang1994'
app.config['GITHUB_REPO'] = 'Blogin'

Choose theme

<head>
    {{githubcard.init_css(theme='darkly')}}
</head>
<div>
    {{githubcard.generate_card(theme='darkly')}}
</div>

Darkly Theme

1623294104103.png

Note

  • Due to the use of GitHub's API without authorization, the number of unique IP visits is limited to 60 times per hour, if more than 60 times, 403 will be reported. If the frequency of access is too high, please go to the authorized account on GitHub
  • In the case where the network state is not good, the access to Github will have timeout, which may cause the web page to not open!

Project details


Download files

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

Source Distribution

Flask-Githubcard-1.0.3.tar.gz (203.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Flask_Githubcard-1.0.3-py2.py3-none-any.whl (204.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Flask-Githubcard-1.0.3.tar.gz.

File metadata

  • Download URL: Flask-Githubcard-1.0.3.tar.gz
  • Upload date:
  • Size: 203.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.9

File hashes

Hashes for Flask-Githubcard-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a5c07c9033f8b1b5a2382b1227af0478ad026ef49dbfbd4c641abeb8b2bd3272
MD5 18e7a77d17a26e46084f720fea071024
BLAKE2b-256 4394ab5c4cb4c56e5937b4f6d22e80c98972746ffb45b679f46f820624c9c9ed

See more details on using hashes here.

File details

Details for the file Flask_Githubcard-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: Flask_Githubcard-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 204.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.9

File hashes

Hashes for Flask_Githubcard-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb5e4bd7ebf779092c8f39e1b0746ceaea9b5ac8f30b8083265872201d3e54f1
MD5 bd1ea1097d4917e9cf92332a7a85b140
BLAKE2b-256 760807b096093eca00c1dad425e9ea195d051c1a4caab35a85e53ef1fc2be06c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page