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.2.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.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odecloud-0.14.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a617d040fa0a22416543ae219828e032449432b4e7b67c4f5ec8009fc3a5e028
MD5 51d425f076b393ba2b18f0ec1a7f80ec
BLAKE2b-256 acc96b1ea162af137c4a4ea3cf7b79f26b99bc7d60d761c89371fe7298feb65f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odecloud-0.14.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eddc6369dcbaca18ad42dd8d279a4eca622443de8b828c401f9350c9d6963da5
MD5 43587e42f8cfc392c0e046d1526d55fd
BLAKE2b-256 fced7231b987cac42c72762225c5fd575f55ee0157c6918e1d3213dcaae838bf

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