Python library for RetroMMO related stuff, including API wrapper

Overview

pyretrommo

python library for RetroMMO related stuff, including API wrapper.

install

python3 -m pip install git+https://github.com/snwhd/pyretrommo.git

web api usage

pyretrommo.api exposes these api methods:

  • get_players() -> List[str] - return usernames of logged-in players
  • get_registered_users() -> int - return number of registered users
  • get_leaderboard(page=1) -> List[ApiPlayerInfo] - fetch leaderboard page
  • get_player(username: str) -> ApiPlayerInfo - fetch user details

The ApiPlayerInfo is used for both get_leaderboard and get_player methods. The leaderboard API does not return the full player info so some fields will not be populated, however when accessing the missing fields (rank, registered_at, and time_played) a get_player request will be automatically sent to populate that field.

>>> import pyretrommo.api as api
>>> player = api.get_player('d')
>>> p.rank
20
>>> for p in api.get_leaderboard()[:5]:
...     print(p)
...

   

    

     

      

        
       
      
     
    
   

other pyretrommo features

The goal of pyretrommo is to provide Python classes for representing game features (players, monsters, items, ...). In the root pyretrommo package you can import:

  • pyretrommo.character - base class for Player and (eventually) Monster
  • pyretrommo.player - a player-character, username, class, level, etc.
  • pyretrommo.item - Item, EquipmentItem, (TODO: Consumable and Cosmetic)
  • pyretrommo.stats - A wrapper class for representing groups of stats, could be player base stats, boosts, or equipment stats.

Some of the specific game details like classes, item stats, and abilities that may be more subject to change are found in pyretrommo.gen. These values are scraped from the RetroMMO wiki to make for easier updates (see gen_from_wiki.py). Note that this script will cache html files in the wiki_cache/ directory to avoid unnecessary HTTP requests during development. If you're not seeing expected results, try deleting this cache. The file names are md5(url).

>>> from pyretrommo.gen.equipment import HeadEquipment
>>> HeadEquipment.JaggedCrown.sell_value
283
>>> HeadEquipment.MageHat.stats.wisdom
2
You might also like...
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

It connects to Telegram's API. It generates JSON files containing channel's data, including channel's information and posts.

It connects to Telegram's API. It generates JSON files containing channel's data, including channel's information and posts. You can search for a specific channel, or a set of channels provided in a text file (one channel per line.)

Discord-Wrapper - Discord Websocket Wrapper in python

This does not currently work and is in development Discord Websocket Wrapper in

Python wrapper library for World Weather Online API

pywwo Python wrapper library for World Weather Online API using lxml.objectify How to use from pywwo import * setKey('your_key', 'free') w=LocalWeat

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

An API Wrapper for Gofile API

Gofile2 from gofile2 import Gofile g_a = Gofile() print(g_a.upload(file="/home/itz-fork/photo.png")) An API Wrapper for Gofile API. About API Gofile

A simple API wrapper for the Tenor API

Gifpy A simple API wrapper for the Tenor API Installation Python 3.9 or higher is recommended python3 -m pip install gifpy Clone repository: $ git cl

An API wrapper around Discord API.

NeoCord This project is work in progress not for production use. An asynchronous API wrapper around Discord API written in Python. Features Modern API

Owner
null
🚀 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
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

Aaron DeVera 2 May 11, 2022
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

Attila Tóth 159 Dec 26, 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
Use an air-gapped Raspberry Pi Zero to sign for Bitcoin transactions! (and do other cool stuff)

Hello World! Build your own offline, airgapped Bitcoin transaction signing device for less than $35! Also generate seed word 24 or generate a seed phr

null 371 Dec 31, 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
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

null 16 Mar 29, 2022
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

TheFarGG 1 Nov 19, 2022