Skip to main content

SDK for creating and registering custon Orrin apps

Project description

Orrin SDK v0.0.8

The Orrrin SDK v0.x.x are the first revolutions 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 sdk import OrrinSDK

orrin_sdk = OrrinSDK(
    developer_api_key='<your_developer_api_key>', # Required
    app_name='A Test App', # Required
    desc='A test app that I am building to test the Orrin platform!' # Required metadata (will be displayed on the Orrin Platform)
)

def lol():
    return 'You can use non-action based function in action-based functions!'

@orrin_sdk.action('test')
def test(a):
    return {'message': f'test done! {a}'}

orrin_sdk.finalize() # Finalizes the configuration, and will perform all requests to create a app backend

(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.

Note: After .finalize(), it can take up to 3 days for the backend configuration to be reviewed. After finalizing, your backend will be "PENDING". The other states are "DENIED" or "AUTHORIZED". Please refer to https://stellr-company.com/orrin/sdk for more information.

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 sdk import OrrinSDK

orrin_sdk = OrrinSDK(
    developer_api_key='<your_developer_api_key>',
    app_name='A Test App',
    desc='A test app that I am building to test the Orrin platform!'
)

def lol():
    return 'You can use non-action based function in action-based functions!'

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

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.8.tar.gz (4.7 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.8-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orrin_sdk-0.0.8.tar.gz
  • Upload date:
  • Size: 4.7 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.8.tar.gz
Algorithm Hash digest
SHA256 b1e6d899f73c843364cdceb43ef3b0b3712a9a8ee52fd11325f60e031f70e527
MD5 fa359fe16a83dcde7d2c3d6c331be0be
BLAKE2b-256 5c47ecc9b37ea59741cbb7b3f4602166747748414eedc4b0e7d6d8ad5b91c413

See more details on using hashes here.

File details

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

File metadata

  • Download URL: orrin_sdk-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 56f7e06aebebda9f3b38564d55d43b17a002f3c1581812e37d217cfaf3523846
MD5 0a8ccda2154310849881ba7723c7d8f8
BLAKE2b-256 edc63a6a0716ce32a7cb76a836fb55211a9e2de77f0fa16a579a5a629b125f4e

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