Skip to main content

Email notifications are a thing of the past, send notifications to messengers

Project description

Beep

This library will help you integrate notifications and authorization via Telegram through our Beep platform.

Preparation

First, you must log into the developer panel on the official Beep website and create your project.

After that, you must copy the ID of your project. It serves as a token, so be careful and keep it secret.

Library usage

Install

Install this library using

pip install beep-notifications

Connecting to the project

Using your project_id create BeepNotify instance.

from beep_notifications import BeepNotify

beep = BeepNotify('some_project_id')

Creating link code

Use get_link_code() method to get link code for your project.

link_code = beep.get_link_code()

Checking link code status

Use check_link_code(code) method to check link code status. It returns accepted, beep_code, username.

accepted, beep_code, username = beep.check_link_code("12345")

Sending notifications

Use send_notification(title, body, username) method to send notifications.

Using username as receiver identification

beep.send_notification("Hello", "I SAID HELLOOOOO", "spiritedRaisins6")

Using Beep code as receiver identification

beep.send_notification("Hello", "I SAID HELLOOOOO", "665123731")

Sending auth code

Use send_auth_code(user_iden) method to send auth code to user, user_iden can be a username or a Beep code.

beep.send_auth_code("spiritedRaisins6")

Try to authorize user with auth code

Use get_token(user_iden, auth_code) method to user authorization, user_iden can be a username or a Beep code.

token = beep.get_token("spiritedRaisins6", "1234")

Validate a token

Use validate_token(token, uac) method to validate a token, uac is 'username_as_code', if uac is True, then return a username of the token owner, else Beep code. This method returns 3 values: validation_result, user_iden and error.

res, user, errpr = beep.validate_token("some_token", uac=True)

Contact me!

Beep Telegram Chat
X / Twitter
Email felix.trof@gmail.com
Telegram

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

beep_notifications-0.2.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

beep_notifications-0.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file beep_notifications-0.2.0.tar.gz.

File metadata

  • Download URL: beep_notifications-0.2.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for beep_notifications-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3a90b4de151b3f75ae29e5e78a01d7684a640839b18d0301248affbae6665164
MD5 1354dd8c2326d1aa7c2eee8bc4e69fad
BLAKE2b-256 7a30897811d70219aecdf8de1970dda0e194392cb65b7644145bc93f79f5318d

See more details on using hashes here.

File details

Details for the file beep_notifications-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for beep_notifications-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9c581b644ac049e76211a5e3cb7a916fc164223a3ca46d2a588a57748afdcdc
MD5 5b2a606d5fef2be88c05ef0964e74630
BLAKE2b-256 4309b0fef16012161daa8a3ef04f6fcbc4f44d4311aad43667b4987a313a0b0f

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