Skip to main content

SDK for creating and registering custon Orrin apps

Project description

Orrin SDK v0.0.7

The Orrrin SDK v0.0.7 is the first revolution of the Orrin SDK, and brings forth a simple Python decorator for developers creating small-scale apps to be deployed on the Orrin platform.

Orrin SDK is the bridge behind backend action and UI manipulation.

Why Python/Node.js mix?

Python is used for simplicity on the backend side of things and compatibility, and node.js is utilized for the frontend as it enables flexibility, and also compatibility.

Orrin Web is also based in node.js, so sustaining that stack for the web platform just simply makes sense.

Orrin SDK actions

The current version offers only one decorator: action. You call this on top of any given function that will be used in your front end code to perform an activity and manipulate the UI.

Example:

from orrinsdk import OrrinSDK

orrin_sdk = OrrinSDK(developer_api_key='<your_developer_api_key>')

@orrin_sdk.action('say_hi')
def say_hi():
    return {'message': 'Hello, world!'}

orrin_sdk.finalize()

(Don't forget .finalize() at the end of your code!)

And now, in your UI, if you utilize this action (using a node.js based SDK) you can utilize the result from this function to determine how to manipulate your UI.

Extra metadata

There will eventually be a elaborate developer platform for you to have direct access to all sorts of data regarding the apps you release and maintain.

With that, you might need to have extra metadata for actions in your backend, especially if your backend grows. (remember to keep your apps small scale; Orrin is not a platform for entire Instagram clones.)

You can add additional metadata about actions like so:

from orrinsdk import OrrinSDK

orrin_sdk = OrrinSDK(developer_api_key='<your_developer_api_key>')

@orrin_sdk.action('say_hi', extra_metadata={'reason': 'This action is just a test. Do not use in production!'})
def say_hi():
    return {'message': 'Hello, World!'}

orrin_sdk.finalize()

There is no limit or requirement to what is in extra_metadata dictionary. Have whatever you need to ensure you understand that action.

One last thing!

Ensure you run your script. By running your script, you effectively register all actions and store the entirety of your backend code.

If you have no functions effectively decorated with action, your entire codebase will be "dead" (have no applicable usability on the Orrin platform)

New versions of Orrin SDK are in the working

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

orrin_sdk-0.0.7.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

orrin_sdk-0.0.7-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file orrin_sdk-0.0.7.tar.gz.

File metadata

  • Download URL: orrin_sdk-0.0.7.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for orrin_sdk-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1bf3937570445e962cfd5eafbaacfecc35958cb5e425e4154972c482260c8507
MD5 fd8832ad1a8788786dcea21dea6685b7
BLAKE2b-256 bd59fdd244f04d3990fa12a328232a8aceede38d27121fcf137bc281f598bf6f

See more details on using hashes here.

File details

Details for the file orrin_sdk-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: orrin_sdk-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for orrin_sdk-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d14e454c1ee195185355f3f8c6bf9d8e4bfca2863c85e83d09dbcaf6a3fd6759
MD5 5bab2e4d757a6f60b5ebffd1dd632628
BLAKE2b-256 3d59094dacb11641ced93afe2a9305eb67f00db62ee83378752c0b74e484b819

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