📦 Opensource Python wrapper for Hiven's REST and WebSocket API

Overview

hiven.py

📦 Opensource Python wrapper for Hiven's REST and WebSocket API

Installation

pip install -U hiven.py

Usage

hiven.py is currently under development (that's going pretty fast), we have the basic receive + send message functionality for (jank) commands though!

Token

Hiven currently only supports selfbots so you'll need to get your Hiven token from the web application or the desktop client.

  1. Open the web app or desktop client
  2. Hit Ctrl+Shift+I to open Developer Tools
  3. Navigate to the Console tab
  4. Type in localStorage["hiven-auth"]
  5. Copy & paste the token in your code

image

Do not share this token with anybody

Quickstart

import hiven
from hiven import Client

bot = Client(bot=False)  # set bot = True if you're controlling a bot account


@bot.event
async def on_ready():
    """Triggered when the bot is ready """
    
    print("hello world!")


@bot.event
async def on_message(message: hiven.Message):
    """Triggered when a message (that the bot can see) is sent"""

    if message.content.startswith("!hello"):
        await message.room.send("hey there!")  # respond to the message if it starts with !hello


bot.run(token="YOUR_TOKEN_HERE")

Credits

  • hiven - for providing such a great service for free

  • discord.py - for providing a easy-to-use structure that we continued in hiven.py

  • openhiven.py & vhiven - for great http & websocket api documentation

  • Iapetus-11 - for consistently providing great tips for efficiency and code quality, and helping out all the time

You might also like...
Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

YARSAW is an Async Python API Wrapper for the Random Stuff API.

Yet Another Random Stuff API Wrapper - YARSAW YARSAW is an Async Python API Wrapper for the Random Stuff API. This module makes it simpler for you to

EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

A simple Python API wrapper for Cloudflare Stream's API.

python-cloudflare-stream A basic Python API wrapper for working with Cloudflare Stream. Arbington.com started off using Cloudflare Stream. We used the

A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key).

fulltmdb A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key). Installation Use the package manager pip t

An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% api coverage most of the codebase is documented

Comments
  • Add autoblack and flake8 workflows

    Add autoblack and flake8 workflows

    • autoblack will automatically format the code in the black codestyle, with a 127 character line length limit.
    • flake8 will also automatically run, and check the code for some errors to help catch issues before publishing.
    opened by Iapetus-11 0
  • Don't ignore raised exceptions in events

    Don't ignore raised exceptions in events

    This PR adds basic error handling for exceptions raised from events dispatched from Client.dispatch_event(...). It nicely prints the exceptions out, along with information on where it came from.

    opened by Iapetus-11 0
  • Object default arguments are BAD

    Object default arguments are BAD

    Occurrences of this throughout your code include:

    • https://github.com/trustedmercury/hiven.py/blob/90935b60899b18f6ff46df552575d8990ed0800f/hiven/gateway/http.py#L12
    • https://github.com/trustedmercury/hiven.py/blob/90935b60899b18f6ff46df552575d8990ed0800f/hiven/client.py#L47

    This is an issue because that object will persist between calls to that function/method. Example: image

    opened by Iapetus-11 2
Owner
Kevin Thomas
Hello 👋 I'm Kevin Thomas, a 14 y/o student, full-stack developer and an aspiring tech entrepreneur. Interested in meeting new people & collaborating!
Kevin Thomas
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

DeepLn 2 Jan 5, 2022
OpenSource bot for control groups ...

⭕️ کمک به افراد برای اداره هرچه فان تره گروه ?? همه گروه های بزرگ نیاز به یه بات خفن دارن تا از گروه مراقبت کنه این بات کارش همینه سعی کرده فیچر خیلی

Mehran Alam Beigi 2 Nov 26, 2021
An opensource chat service that cares about your privacy.

An opensource chat service that cares about your privacy. Instructions to set up a local testing environment: 1) Clone this repository and navigate to

Aiman Al Masoud 2 Dec 3, 2022
Python3 based bittrex rest api wrapper

bittrex-rest-api This open source project was created to give an understanding of the Bittrex Rest API v1.1/v3.0 in pearl language. The sample file sh

null 4 Nov 15, 2022
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

null 1 May 20, 2022
Change the discord status throught websocket every 5 seconds with an insult

Discord status insult changer Change the discord status throught websocket every 5 seconds with an insult! - pip install httpx - put your tokens in "t

Ѵιcнч 10 Oct 27, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Richard Kolkovich 904 Jan 2, 2023