Skip to main content

Python API wrapper for the pushbullet API

Project description

Pyshbullet v1.1.50

Pyshbullet is a async-based API wrapper for the Pushbullet API service.

Example usage:

import pyshbullet
import asyncio
import os
client = pyshbullet.APIClient(TOKEN)
async def main():
  userobj = await client.get_current_user()
  print(userobj.created)
  pushesobj = await client.get_push_history(limit=2)
  print([message.sent.strftime('%m-%d-%Y') for message in pushesobj])
  chats = await client.list_chats()
  print([chat.created.strftime('%m-%d-%Y') for chat in chats])
  print([chat.chatting_with.name for chat in chats if chat.chatting_with != None])
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
@client.event
async def on_message(message):
  print(f"Message sent: {message.sent.strftime('%m-%d-%Y')}")
  print(f'Message content: {message.content}')
  print(f'Message type: {message.type}')
  print(f'Message image url: {message.image_url}')
  print(f'Message file url: {message.file_url}')
  print(f'Message author: {message.author.name}')
  print(f'Message author email: {message.author.email}')
@client.event
async def on_run():
  print('Started running.')
client.run()

Replace TOKEN with your Pushbullet API token.

The code above gets the user associated with the API token, and will listen to the websocket. Once a new message is sent, it prints out the data of the message.

Documentation will be added in the future.

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

pyshbullet-1.1.50.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

pyshbullet-1.1.50-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file pyshbullet-1.1.50.tar.gz.

File metadata

  • Download URL: pyshbullet-1.1.50.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pyshbullet-1.1.50.tar.gz
Algorithm Hash digest
SHA256 4c8500ed26279d61a3e339fd876824acd74b9a7b8e012ea88a6638fc1d6725d6
MD5 17b24670d105bd15c7d4f8f295fc853b
BLAKE2b-256 958756fbb50b270f96de353d489aad5af016961a91d0a84ffed7eaae55ef5a20

See more details on using hashes here.

File details

Details for the file pyshbullet-1.1.50-py3-none-any.whl.

File metadata

  • Download URL: pyshbullet-1.1.50-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pyshbullet-1.1.50-py3-none-any.whl
Algorithm Hash digest
SHA256 9c44c87d6385f09d591dfc852a64c2a7cfc2679cb09c09d34e0fe208453a084d
MD5 b161dd500eb85cfaa0c1f0cc4fbf013a
BLAKE2b-256 b5926127375b09a994127a46b8ab8bf36d4fb56fb689d5f7e86f78c794316626

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