Skip to main content

Python client for https://server.odecloud.app

Project description

Official OdeServer Python API's Client

Getting Started & Usage

  1. Installation:
  • Use Poetry:
    $ poetry add odecloud
    
  • Or, use Pip:
    $ pip install odecloud
    
  1. Instantiate your connection to OdeCloud's API:
  • If you don't know your client credentials:

    from odecloud.api.connection import Api
    
    api = Api('https://server.odecloud.app/api/v1') # All API calls will be made to this domain.
    api.login('your-email@here.com', 'your_password', "your_app_url")
    
  • If you already know your client credentials:

    from odecloud.api.connection import Api
    
    api = Api(
        base_url='https://server.odecloud.app/api/v1', # All API calls will be made to this domain
        client_key='YOUR CLIENT KEY',
        client_secret='YOUR CLIENT SECRET',
    )
    
  1. Now, any calls can be made to OdeCloud's API. Examples below:
    api.messages(message_id).get(origin="the_app_you_are_sending_from") # GET /api/v1/messages/message_id?origin=odesocial
    api.comments.post(data=expected_payload) # POST /api/v1/comments/
    api.comments(random_comment_id).patch(data=expected_payload) # PATCH /api/v1/comments/random_comment_id/
    api.comments(random_comment_id).delete() # DELETE /api/v1/comments/random_comment_id/
    

Happy coding!

Publishing to PyPI

  1. On the root of the directory, open up pyproject.toml
  2. Bump the version by the following guideline:
    • Our version numbering follows Major.Minor.Patch (e.g. 2.10.1)
      • Major: Stable release.
      • Minor: Incremental changes--including new API, remove API, or change of behavior of the API.
      • Patch: Small efficient changes--including a fixed to a bug.
    • Note: in regards to Patch if the old functionality was always erroneous, then it will be considered a Patch.
  3. Publish a new tag on the repository by going to https://gitlab.com/odetech/python_odecloud/-/tags/new.
    • Note: make sure that the "Tag Name" is an exact match to the version inside pyproject.toml on step #2.
    • In regards to the "Release notes": we encourage detail and consistent format in order for other developers to understand the new version update.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odecloud-0.14.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odecloud-0.14.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file odecloud-0.14.1.tar.gz.

File metadata

  • Download URL: odecloud-0.14.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/5.15.154+

File hashes

Hashes for odecloud-0.14.1.tar.gz
Algorithm Hash digest
SHA256 a78aef057c2b12325cbb9c2fb6194c0e0ab87ad485269db0edbd714aa4cc1032
MD5 e09551b7cb8d7a5e14b224d0163489ea
BLAKE2b-256 a69bf309b0b8860c1a361a607eeb49afe56a35f92d63c1a04c3692fd6042d9af

See more details on using hashes here.

File details

Details for the file odecloud-0.14.1-py3-none-any.whl.

File metadata

  • Download URL: odecloud-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/5.15.154+

File hashes

Hashes for odecloud-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca24eaf01bb82a578adaf7cbea5b4f424be44f3e18fd265617058c575feedd5
MD5 532df14f987b45f2046dc258ec4da081
BLAKE2b-256 0963083cb920ca5b0bdcf1e17303cc290997cf8d054b129d9c9f30b635f648ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page