Skip to main content

GitflicApi wrapper

Project description

gitflic

GitHub license GitHub stars magic
preview ds

About

This is wrapper of gitflic API.
All API documentation is here: https://gitflic.ru/help/api/intro

Installation

Install via pip:

pip install gitflic

Example:

All examples in examples dir.

from gitflic import Gitflic, GitflicAuth

token = "token_here"  # https://gitflic.ru/settings/oauth/token/create

gf_session = GitflicAuth(token)
gf = Gitflic(gf_session)

me_call = gf.call("/user/me")
print(me_call)

# Register call
gf.user = gf.reg_call("/user")

# Request "https://api.gitflic.ru/user/me"
me_with_reg = gf.user("/me")
print(me_with_reg)
print("Is me_with_reg equals me_call:", me_with_reg == me_call)

# Request "https://api.gitflic.ru/user/a4189db1-3e4f-4c2e-8adf-19c58c28e61f"
author = gf.user("/a4189db1-3e4f-4c2e-8adf-19c58c28e61f")
print("\nAuthor: ", author)

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

gitflic-0.9.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

gitflic-0.9-py3-none-any.whl (8.7 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