GithubHelp home page GithubHelp logo

florgon / gatey-sdk-py Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 106 KB

Gatey Python SDK. Works with Florgon hosted, or self-hosted server.

Home Page: https://gatey-sdk-py.rtfd.io

License: MIT License

Python 100.00%
sdk gatey error-logging exceptions-handling library pypi python fastapi starlette

gatey-sdk-py's Introduction

Florgon Gatey SDK for Python (Official).

This is the official Python SDK for Florgon Gatey

Getting Started

Install

pip install --upgrade gatey-sdk

Configuration

import gatey_sdk
client = gatey_sdk.Client(
    project_id=PROJECT_ID,
    server_secret=PROJECT_SERVER_SECRET,
    client_secret=PROJECT_CLIENT_SECRET,
)
# Notice that you should only enter server or client secret, passing both have no effect as always server will be used.
# (as client not preferred if server secret is passed).

Usage

import gatey_sdk
client = gatey_sdk.Client(
    project_id=PROJECT_ID,
    server_secret=PROJECT_SERVER_SECRET,
)

# Will send message (capture).
client.capture_message("Hello Python Gatey SDK!", level="DEBUG")

# Will capture exception.
@client.catch()
def f():
    raise ValueError

# Same as above.
try:
    raise ValueError
except Exception as e:
    client.capture_exception(e)

# Will work by default also (see Client(handle_global_exceptions=True))
raise ValueError


# (Notice that events by default being sent not immediatly!)

Examples

See examples directory...

Integrations

See integrations directory...
See examples directory...

Documentation.

ReadTheDocs
Gatey Documentation

License

Licensed under the MIT license, see LICENSE

gatey-sdk-py's People

Contributors

kirillzhosul avatar stepanzubkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

stepanzubkov

gatey-sdk-py's Issues

CPU Model name is weird.

Hi. In https://github.com/florgon/gatey-sdk-py/edit/main/gatey_sdk/platform.py CPU information is alright, but it's not understandable at first.

The issue here, when the regular user sees

Intel64 Family 6 Model 23 Stepping 6, GenuineIntel

instead of

Intel Celeron(R) Dual-Core CPU T3300 2.00GHz

it confuses the user. What the hell is Intel64 Family 6 Model 23? Where is my Intel Celeron Dual-Core T3300?

I have a solution for this, use cpuinfo library instead of platform.

And instead of codenames, the user will see the brand name of the CPU, that won't confuse the user.

Example: cpuinfo.cpu.info[0]['model name']
I've already created a commit, can you merge my changes to the main repo?

Greetings,
Emil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.