Coder Social home page Coder Social logo

pyblox's Introduction

Pyblox

GitHub license Travis ROBLOX API Discord Downloads

This is no longer maintained and will not recieve updates. To find the maintained/updated one, please go here: https://github.com/RbxAPI/Pyblox

An API wrapper for Roblox written in Python.

The purpose of this API wrapper is to expose Roblox's API for third party use and/or for individual standalone projects. This is the first stable Python API wrapper for the Roblox API. Documentation can be found within each module. I encourage developers to look into the codebase to better understand this wrapper and what it can truly offer.

If you would like to contribute, create a pull request with the changes you made. If you have a complaint, issue or problem, create an issue and I will try to answer as fast as I can.

For user's wanting a Python 2x-compatible version: https://github.com/Sanjay-B/Pyblox/tree/python2

For users wanting a mid-stable, asynchronous-version: https://github.com/RbxAPI/Pyblox/tree/nightly_build

Updating

The Roblox API updates whenever necessary and often the developers don't specify when or why these changes are taking place. Due to this, this repo could break at anytime. If a break does occur, please open up an issue at https://github.com/RbxAPI/Pyblox detailing the error.

Installing

There's now two ways to install Pyblox. You may now do it through pip: pip install pyblox3 or do it manually below:

1. Download or Clone this repo
2. Place the "pyblox" folder into C:\Users\YOURUSERNAMEONWINDOWSMACHINE\AppData\Local\Programs\Python\Python35-32\Lib\site-packages

MacOS and Linux are supported but installation will vary. This was developed on a windows-based machine and thus, it's recommended to use windows.

Please note that the "Clone" method is regulary updated. However, the pip-version is often behind.

Quick Example

from pyblox3 import Friends # Imports the Friends class from pyblox wrapper 

def GetAllFriends():
	CoolPeople = Friends.friendList(1) # Takes page number
	print(CoolPeople) # Returns usernames and prints them on console

GetAllFriends() # Calls "GetAllFriends" method

Requirements

  • Python 3+
  • pip install requests

note: requests may have been already installed. python 2x version can be found https://github.com/Sanjay-B/Pyblox/tree/python2

Related Projects

https://github.com/sentanos/roblox-js https://github.com/CrescentCode/RobloxCommunication https://github.com/NoahCristino/robloxlib https://github.com/winfamy/nodeblox https://github.com/gamenew09/RobloxAPI https://github.com/NevermoreFramework/Nevermore

pyblox's People

Contributors

anyputer avatar pythonic-rainbow avatar sanjay-b avatar sentanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyblox's Issues

bug on python 3.6.4 with timegm

I think is a common error on python 3 ( see another issue: wit-ai/pywit#116)
I got this error with this python module :

C:\Python364>python.exe
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]
 on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyblox3 import Friends
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python364\lib\site-packages\pyblox3\__init__.py", line 16, in <module
>
    from .api.assets import Assets
  File "C:\Python364\lib\site-packages\pyblox3\api\assets.py", line 9, in <modul
e>
    from .http import Http
  File "C:\Python364\lib\site-packages\pyblox3\api\http.py", line 10, in <module
>
    import requests
  File "C:\Python364\lib\site-packages\requests\__init__.py", line 112, in <modu
le>
    from . import utils
  File "C:\Python364\lib\site-packages\requests\utils.py", line 26, in <module>
    from ._internal_utils import to_native_string
  File "C:\Python364\lib\site-packages\requests\_internal_utils.py", line 11, in
 <module>
    from .compat import is_py2, builtin_str, str
  File "C:\Python364\lib\site-packages\requests\compat.py", line 60, in <module>

    from http import cookiejar as cookielib
  File "C:\Python364\lib\http\cookiejar.py", line 41, in <module>
    from calendar import timegm
ImportError: cannot import name 'timegm'

Bump Python support to 3.5+

No effort for backwards compatibility will be made. May offer a legacy version of Pyblox for user's who are still using Python 2.7.

wrong test python 2.7 and py 3.x

I try with Python 2.7 , I know you write for Python 3.x
The result is this:

>>> import pyblox
>>> from pyblox import *
>>> dir(pyblox)
['DispatchingConfig', 'StackedObjectProxy', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'app_globals', 'auth_id', 'cache', 'config', 'permissions', 'pkg_resources', 'request', 'response', 'session', 'template', 'tmpl_context', 'url']
>>> from pyblox import Friends
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Friends

maybe you will fix also for python 2.7 , most users use this version.

Add Resource System

Add a way to allow use-made extensions to Pyblox. Installation of said extensions would take place over a command line client that Pyblox would come with.

Breaking Changes - Next Version

Greetings,

For any of you who will read this, I've decided to change the structure and design of Pyblox. As such, for the Python 3.x version, I feel like it should have more capabilities and handle more stuff instead of spitting out endpoint responses. Below outlines all the stuff you should expect in the next version.

Changes

  • Objects, when created, will be more streamlined
  • Cache will be concurrent and update automatically
  • In-depth Classes
  • Dependency structural changes

Additions

  • Server Interface
  • Endpoint Interface
  • Command-line-interface ?
  • Security API
  • Authentication API
  • Improved Cache-system
  • Increase Roblox exposure 100%

The items above outline some of the major changes. Previous code may or may not break.

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.