PloudosAPI


NamePloudosAPI JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryPloudOS API interactions like starting servers etc.
upload_time2023-08-26 20:48:19
maintainer
docs_urlNone
authorTimMcCool
requires_python
license
keywords python ploudos api ploudos api ploudos api wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PloudosAPI
==========

An API Wrapper to interact with ploudos.com
-----------------------------------------------

With PloudosAPI, you can start and stop your PloudOS servers, get the
server console, run commands and do lots of other stuff.

Install the package
-------------------

To install the package, run the command ``pip install PloudosAPI``.

Get started
-----------

Log in to your PloudOS account:

::

   import PloudosAPI
   session = PloudosAPI.login("username", "password") #replace with your PloudOS username / password

Get a PloudOS server by its id:

::

   server = session.get_server("server_id")

... or by its name:

::

   servers = session.get_servers_with_name("name")
   server = servers[0]

Start the server:

::

   server.start()

.. warning::
   Keeping a server online with a Bot or other programs is against the PloudOS `Terms of Service <https://ploudos.com/rules/>`_.

Get the server console and execute commands:
(Only works when the server is running)

::

   console = server.get_console()

   server.post_to_console("command") #replace with the command you want to run

Stop the PloudOS server:

::

   server.stop()


Get your PloudOS servers:

::

   my_servers = session.servers()

``session.servers()`` returns a dict with your PloudOS servers that looks like this:

.. code:: json

   {
       "owned" : [
           PloudosAPI.PloudosServer,
           PloudosAPI.PloudosServer,
           ...
       ],
       "shared" : [
           PloudosAPI.PloudosServer,
           PloudosAPI.PloudosServer,
           ...
       ]
   }

Other stuff
-----------

Force a server shutdown:

::

   server.force_stop()

Regenerate the server’s world:

::

   server.regenerate_world(*, seed="your_seed", hardcore=False)


Share the server with a PloudOS user:

::

   server.share_add("user")

Remove the access of a PloudOS user:

::

   server.share_remove("user")

Ban / Unban a minecraft player from the server:

::

   server.ban("player")

   server.unban("player")

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PloudosAPI",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,ploudos,api,ploudos api,ploudos api wrapper",
    "author": "TimMcCool",
    "author_email": "timmccool.scratch@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d1/e3/56f69cceb529f6773449660301a417589d3e6f25f07dbb713b365032a064/PloudosAPI-0.1.0.tar.gz",
    "platform": null,
    "description": "PloudosAPI\r\n==========\r\n\r\nAn API Wrapper to interact with ploudos.com\r\n-----------------------------------------------\r\n\r\nWith PloudosAPI, you can start and stop your PloudOS servers, get the\r\nserver console, run commands and do lots of other stuff.\r\n\r\nInstall the package\r\n-------------------\r\n\r\nTo install the package, run the command ``pip install PloudosAPI``.\r\n\r\nGet started\r\n-----------\r\n\r\nLog in to your PloudOS account:\r\n\r\n::\r\n\r\n   import PloudosAPI\r\n   session = PloudosAPI.login(\"username\", \"password\") #replace with your PloudOS username / password\r\n\r\nGet a PloudOS server by its id:\r\n\r\n::\r\n\r\n   server = session.get_server(\"server_id\")\r\n\r\n... or by its name:\r\n\r\n::\r\n\r\n   servers = session.get_servers_with_name(\"name\")\r\n   server = servers[0]\r\n\r\nStart the server:\r\n\r\n::\r\n\r\n   server.start()\r\n\r\n.. warning::\r\n   Keeping a server online with a Bot or other programs is against the PloudOS `Terms of Service <https://ploudos.com/rules/>`_.\r\n\r\nGet the server console and execute commands:\r\n(Only works when the server is running)\r\n\r\n::\r\n\r\n   console = server.get_console()\r\n\r\n   server.post_to_console(\"command\") #replace with the command you want to run\r\n\r\nStop the PloudOS server:\r\n\r\n::\r\n\r\n   server.stop()\r\n\r\n\r\nGet your PloudOS servers:\r\n\r\n::\r\n\r\n   my_servers = session.servers()\r\n\r\n``session.servers()`` returns a dict with your PloudOS servers that looks like this:\r\n\r\n.. code:: json\r\n\r\n   {\r\n       \"owned\" : [\r\n           PloudosAPI.PloudosServer,\r\n           PloudosAPI.PloudosServer,\r\n           ...\r\n       ],\r\n       \"shared\" : [\r\n           PloudosAPI.PloudosServer,\r\n           PloudosAPI.PloudosServer,\r\n           ...\r\n       ]\r\n   }\r\n\r\nOther stuff\r\n-----------\r\n\r\nForce a server shutdown:\r\n\r\n::\r\n\r\n   server.force_stop()\r\n\r\nRegenerate the server\u00e2\u20ac\u2122s world:\r\n\r\n::\r\n\r\n   server.regenerate_world(*, seed=\"your_seed\", hardcore=False)\r\n\r\n\r\nShare the server with a PloudOS user:\r\n\r\n::\r\n\r\n   server.share_add(\"user\")\r\n\r\nRemove the access of a PloudOS user:\r\n\r\n::\r\n\r\n   server.share_remove(\"user\")\r\n\r\nBan / Unban a minecraft player from the server:\r\n\r\n::\r\n\r\n   server.ban(\"player\")\r\n\r\n   server.unban(\"player\")\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "PloudOS API interactions like starting servers etc.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "python",
        "ploudos",
        "api",
        "ploudos api",
        "ploudos api wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a5ca9c923abd067d06d908de34b37cf17468bdff141c407499ec8f1e4eb9c71",
                "md5": "3ffbeda7d5a37399a6c59d1b67a14ef3",
                "sha256": "3f162464d2779c948d70c4be082e8a25e6f6e99f3b4a213e190aba8741c6e7ed"
            },
            "downloads": -1,
            "filename": "PloudosAPI-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3ffbeda7d5a37399a6c59d1b67a14ef3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7035,
            "upload_time": "2023-08-26T20:48:17",
            "upload_time_iso_8601": "2023-08-26T20:48:17.339475Z",
            "url": "https://files.pythonhosted.org/packages/8a/5c/a9c923abd067d06d908de34b37cf17468bdff141c407499ec8f1e4eb9c71/PloudosAPI-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1e356f69cceb529f6773449660301a417589d3e6f25f07dbb713b365032a064",
                "md5": "86a8834d5e7cf3c3d65b7cbef25a65ba",
                "sha256": "f89ca4f0989fa42a591a8179fcb6bfa1253f282b50be9066abd72835b3dbb126"
            },
            "downloads": -1,
            "filename": "PloudosAPI-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "86a8834d5e7cf3c3d65b7cbef25a65ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4665,
            "upload_time": "2023-08-26T20:48:19",
            "upload_time_iso_8601": "2023-08-26T20:48:19.781073Z",
            "url": "https://files.pythonhosted.org/packages/d1/e3/56f69cceb529f6773449660301a417589d3e6f25f07dbb713b365032a064/PloudosAPI-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-26 20:48:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ploudosapi"
}
        
Elapsed time: 0.14870s