ro.py is a modern, asynchronous Python 3 wrapper for the Roblox API.

Overview

ro.py

GitHub | Discord | PyPI | Documentation | Examples | License

RoAPI Discord ro.py PyPI ro.py PyPI Downloads ro.py PyPI Downloads (Legacy) ro.py PyPI License ro.py GitHub Commit Activity ro.py GitHub Last Commit

Overview

Welcome to ro.py! ro.py is an asynchronous, object-oriented wrapper for the Roblox web API.

Features

The key features are:

  • Asynchronous: ro.py works well with asynchronous frameworks like FastAPI and discord.py.
  • Easy: ro.py's client-based model is intuitive and easy to learn for both the beginner and expert developer. It abstracts away API requests and leaves you with simple objects that represent data types on the Roblox platform.
  • Flexible: ro.py's builtin Requests object allows the user to do things that we haven't already implemented ourselves without dealing with advanced Roblox-specific concepts.

Installation

To install ro.py from PyPI, you can install with pip:

pip install roblox

To install the latest unstable version of ro.py, install git-scm and run the following:

pip install git+git://github.com/ro-py/ro.py.git

Tutorial

Learn how to use ro.py in our docs: https://ro.py.jmk.gg/tutorial/

Comments
  • Problems with .join() and browser_tracker_id

    Problems with .join() and browser_tracker_id

    Describe the bug When trying to launch a game I get this error pycharm64_RoMMnoEtNO

    To Reproduce Use .join() on a root game place

    Expected behavior Expected the game to start

    Additional context I am using the Bleeding Edge version as the stable one had the error in the screenshot pycharm64_099xeypO9t

    opened by ghost 8
  • Message Router API

    Message Router API

    This API only consists of /v1/router/signalr, and will only support Studio messages (I haven't found out what the main channel/main accessKey is for open grid servers)

    opened by nikita-petko 8
  • Inconsistencies between return types on different Client methods

    Inconsistencies between return types on different Client methods

    Roblox endpoints that take in a single ID, like users.roblox.com/v1/users/{userId}, usually raise errors when the passed ID is invalid or does not exist. For example, /v1/users/{userId} returns the following data and a 404 error when an invalid user ID is passed:

    {
      "errors": [
        {
          "code": 3,
          "message": "The user id is invalid.",
          "userFacingMessage": "Something went wrong"
        }
      ]
    }
    

    In ro.py, this means we can raise a NotFound error:

    roblox.utilities.exceptions.NotFound: 404 Not Found: https://users.roblox.com/v1/users/4.
    
    Errors:
    	3: The user id is invalid.
    		User-facing message: Something went wrong
    

    Endpoints that take in multiple user IDs, like games.roblox.com/v1/games/multiget-place-details, tend to ignore invalid IDs and don't raise errors if none of the IDs are valid. In ro.py, all of our get_PLURAL functions like get_places and get_universes maintain this behavior and do not raise errors for invalid IDs.

    The issue is that not all of our get_SINGULAR functions use endpoints that only take in one ID. multiget-place-details is the only endpoint ro.py uses for places. Because it does not raise an error, get_place returns None if the place is invalid and doesn't raise an exception. Multiple other methods also have this behavior.

    This causes an inconsistency between methods where some methods (the ones that send requests that take just one ID) raise errors with invalid inputs, but other methods (the ones that take multiple IDs but only pass one) don't raise errors.

    The following Client methods all return None with invalid IDs:

    get_user_by_username()
    get_universe()
    get_place()
    get_plugin()
    

    All other singular methods raise exceptions for invalid IDs. This causes an inconsistency between methods. What should we do?

    We have a couple options here:

    • Make the other methods also return None instead of raising exceptions
      • Not only is this a large breaking change, but it's also not proper when compared to API responses which do raise errors. I feel better about raising errors manually than I do about replacing the API's error behavior.
    • Raise fake NotFound errors on these methods in particular
      • I don't like this because we're only supposed to raise NotFound for actual 404 errors.
    • Create custom errors, like UserNotFound that are raised in place of NotFound on get_user and get_user_by_username, and do the same for other methods
      • This means you can't do a try-except for NotFound on get_user anymore, which is breaking.
      • Making it a subclass of HTTPException kind of breaks the rules because it's really only for 4xx/5xx HTTP status codes, not for other purposes.
      • Making it a subclass of RobloxException means we're not raising the right exception for get_user anymore. That's an actual HTTP exception, so I think we should keep that there.
      • Only raising it for get_user_by_username and not get_user is a bit weird for the developer because there's an exception called UserNotFound that isn't raised on the method used to get users but is raised on the method used to get users by username.
    • Live with the inconsistencies.
      • Obviously not ideal. 😔
    • Completely get rid of get_user_by_username, get_universe, get_place and get_plugin and force developers to use their plural counterparts: get_users_by_username, get_universes, get_places and get_plugins.
      • This makes the methods consistent now but breaks existing code and is not really ideal.
    opened by jmkd3v 7
  • Advice for the rewrite

    Advice for the rewrite

    There is an issue with production right now, there is little to no strong typing on anything.

    All implementations for the rewrite should be strong typed, as it is supported.

    The benefits of this include stronger intellisense.

    If you look at my libraries they show strong typed code, with predicable interfaces, it is preferable to do this because it is more convenient than having to go to some documentation page.

    image image

    You can disregard this issue if you wish, but take it into mind.

    opened by nikita-petko 4
  • PIP install Error

    PIP install Error

    So when I try to install the latest version using the readme as a guide, I get an exit code of 128 and am unable to install.

      Cloning git://github.com/ro-py/ro.py.git to c:\users\willy\appdata\local\temp\pip-req-build-6sxtv1nh
      Running command git clone --filter=blob:none --quiet git://github.com/ro-py/ro.py.git 'C:\Users\###\AppData\Local\Temp\pip-req-build-6sxtv1nh'
      fatal: unable to connect to github.com:
      github.com[0: 140.82.113.4]: errno=Unknown error
    
      error: subprocess-exited-with-error
    
      × git clone --filter=blob:none --quiet git://github.com/ro-py/ro.py.git 'C:\Users\###\AppData\Local\Temp\pip-req-build-6sxtv1nh' did not run successfully.
      │ exit code: 128
      ╰─> See above for output.
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: subprocess-exited-with-error
    
    × git clone --filter=blob:none --quiet git://github.com/ro-py/ro.py.git 'C:\Users\###\AppData\Local\Temp\pip-req-build-6sxtv1nh' did not run successfully.
    │ exit code: 128
    ╰─> See above for output.
    
    note: This error originates from a subprocess, and is likely not a problem with pip.```
    opened by LIPDProductionsInc 2
  • Calling group.get_member(id) errors

    Calling group.get_member(id) errors

    Describe the bug When calling group.get_member(id), the following error is thrown:

    obraz

    To Reproduce Call .get_member(id) on a group object.

    Expected behaviour Expected the call to not error and return a Member object.

    Additional context A request to https://groups.roblox.com/v2/users/{userId}/groups/roles is sent, and passed on to Member. It will attempt to index the user key on the data, which errors because the endpoint does not return that data.

    obraz

    opened by zmadie 2
  • Fix get_member_by_id not found error.

    Fix get_member_by_id not found error.

    Before, get_member_by_id would error with a NotFound since it was trying to compare a string and an int. This just adds an int() to convert the group id to an int, which is what the response is.

    opened by slickxz 2
  • Checking a user's inventory

    Checking a user's inventory

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] NO If your feature is related to implementing a new Roblox API, provide information here. API URL: https://users.roblox.com/v1/users/{userId} Documented: Yes/No no

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. It would be cool if we could check a user's inventory for checking gamepasses or asset's and then from there, ranking them in your group. Additional context Add any other context or screenshots about the feature request here.

    opened by kenthegreat8 2
  • Add a function for change the password

    Add a function for change the password

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    If your feature is related to implementing a new Roblox API, provide information here. API URL: https://users.roblox.com/v1/users/{userId} Documented: Yes/No

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    opened by HRT9014 1
  • Improve docs

    Improve docs

    Improving the docs would improve developers workflow and code efficiency which would result in lower amount of requests aswell.

    My suggestion on how to improve docs:

    • Add ~40px space or a separator between each method so its visible what belongs where
    • Remove unnecessary source code snippets and replace them with code examples (on the methods which might sound confusing)
    • Remove unnecessary init constructors found at some methods
    • Make an examples tab
    opened by kuhanaklobasa 1
  • Turn ro.py objects into Python dataclasses

    Turn ro.py objects into Python dataclasses

    The Python 3.7 feature "Dataclasses" could be very useful for ro.py. Our objects, like User, should be immutable as the only way to return new information is generating a new object entirely. https://docs.python.org/3.9/library/dataclasses.html

    opened by jmkd3v 1
  • Added has_verified_badge

    Added has_verified_badge

    Changes:

    • Added has_verified_badge to User
    • Added has_verified_badge to PartialUser
    • Added has_verified_badge to Group
    • Added has_verified_badge to UniversePartialGroup
    • Added has_verified_badge to AssetPartialGroup
    • Added has_verified_badge to Place
    • Added has_verified_badge to Member
    opened by Jodenee 0
  • Update client.py

    Update client.py

    Add group_search to client.

    E.g:

     async for group in client.group_search("roblox").items(10):
        print(group.name)
    

    Returns:

    Roblox
    Roblox High School: Fan Club
    RODNY ROBLOX
    Roblox Wiki
    Studios Military Roleplay Fan Roblox Clothing
    LankyBox Roblox Group!
    Roblox+
    Roblox Military Building Roleplaying Community
    Robloxian High School Group
    Roblox catalog Group fan
    
    opened by CookieHax 0
  • Documentation fixes

    Documentation fixes

    Fixes links to the Bases page for every get_base_XYZ method documentation and clarifies that get_base_XYZ is not asynchronous and does not need to be awaited in bases.md

    opened by Auriosi 0
  • Add an option to pass your own requests class into the client

    Add an option to pass your own requests class into the client

    Is your feature request related to a problem? Please describe. Yes, I wanted to customise timeouts but I didn't have a way so I wrote spaghetti code :=)

    If your feature is related to implementing a new Roblox API, provide information here. API URL: none Documented: none

    Describe the solution you'd like Add an option to pass your own requests class into the client

    Describe alternatives you've considered None

    Additional context

    session = httpx.Session(timeout=10)
    requests = Requests(
        url_generator=None,
        session=session
    )
    client = Client(requests=requests)
    
    opened by kuhanaklobasa 1
Releases(v2.0.0)
Owner
ro.py
ro.py is a powerful Python library for interacting with the Roblox web API.
ro.py
Disqus API bindings for Python

disqus-python Let's start with installing the API: pip install disqus-python Use the API by instantiating it, and then calling the method through dott

DISQUS 163 Oct 14, 2022
Collect links to profiles by username through search engines

Marple Summary Collect links to profiles by username through search engines (currently Google and DuckDuckGo). Quick Start ./marple.py soxoj Results:

125 Dec 19, 2022
Simple Discord Nuke Bot.

Discord-Nuke-Bot Simple Discord Nuke Bot. Simple Discord Nuke Bot Python 3.6 - 3.8 Features Delete Channels Ban All Members Delete Roles Create Channe

9X4N 6 Aug 16, 2022
The Research PACS on AWS solution facilitates researchers' access medical images stored in the clinical PACS in a secure and seamless manner

Research PACS on AWS Challenge to solve Solution presentation Deploy the solution Further reading Releases License Challenge to solve The rise of new

AWS Samples 23 Sep 09, 2022
Telegram-Voice Recoginiton Project (Python)

Telegram-Voice Recoginiton Project (Python) It is a telegram bot that analyses voice messages and convert it to text and reply back response on bot's

Krishnadev P Melevila 1 Jan 28, 2022
A simple script that will watch a stream for you and earn the channel points.

Credits Main idea: https://github.com/gottagofaster236/Twitch-Channel-Points-Miner Bet system (Selenium): https://github.com/ClementRoyer/TwitchAutoCo

Alessandro Maggio 1.1k Jan 08, 2023
Discord-RAID-Tool - Hacks/tools

How to use Python must be installed run install-config If you dont have python installed, download python 3.7.6 and make sure you click on the 'ADD TO

1 Jan 01, 2022
A tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives.

tg-archive is a tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives. Preview The @fossuni

Kailash Nadh 400 Dec 27, 2022
Yes, it's true :two_hearts: This repository has 316 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serverless! If

510 Dec 28, 2022
A bot created with Python that interacts with GroupMe

GroupMe_Bot This is a bot I'm working on a small groupme group I'm in. This is something I'll work on in my spare time. Nothing but just a fun little

0 May 19, 2022
Python client for CoinPayments API

pyCoinPayments - Python API client for CoinPayments Updates This library has now been converted to work with python3 This is an unofficial client for

James 27 Sep 21, 2022
This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, having fun :) Creator: Marlon Zanardi

🚀 Space Crypto auto click bot ready-to-use 🚀 This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, ha

170 Dec 20, 2022
🚀 A fast, flexible and lightweight Discord API wrapper for Python.

Krema A fast, flexible and lightweight Discord API wrapper for Python. Installation Unikorn unikorn add kremayard krema -no-confirmation Pip pip insta

Krema 20 Sep 04, 2022
An Advance Discord Generator Written in python Verified Email and Phone Number For Free!

Intro An Advance Discord Generator Written in python It can generate nearly fully verified tokens USAGE put server invite code inside ( invitecode = "

36 May 02, 2022
To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window

To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window Insp

Ritin George 6 Mar 11, 2022
自动每天给女友发邮件

github acitons 发邮件 python 脚本 每天 7点半左右给女朋友发送邮件 天气来自: http://www.tianqiapi.com/ 文字图片来源:http://wufazhuce.com/ 风景图:https://qqlykm.cn/api/fengjing 土味情话:htt

gogobody 7 May 12, 2022
Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHub.

uBlock-Origin-dev-filter Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHu

1.7k Dec 30, 2022
🖥️ Windows Batch and powershell Discord Token grabber. Made for Troll (lmao)

Batched-Grabber Windows Batch and powershell Discord Token grabber. Made for Troll ! Setup. 1. pip(3) install numpy colored 2. python(3) Batched.py 3.

Ѵιcнч 41 Nov 01, 2022
Automate HoYoLAB Genshin Daily Check-In Using Github Actions

Genshin Daily Check-In 🤖 Automate HoYoLAB Daily Check-In Using Github Actions KOR, ENG Instructions Fork the repository Go to Settings - Secrets Cli

Leo Kim 41 Jun 24, 2022
Use Seaborn to visualize interpret the byte layout of Solana account types

solana-account-vis Use Seaborn to visually interpret the byte layout of Solana account types Usage from account_visualization import generate_account_

Jarry Xiao 15 Aug 25, 2022