Skip to main content

SDK for creating and registering custom Orrin apps

Project description

Orrin SDK v0.0.10

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

orrin_sdk-0.0.11-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orrin_sdk-0.0.11.tar.gz
  • Upload date:
  • Size: 5.8 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.11.tar.gz
Algorithm Hash digest
SHA256 0d3ee3af177b657c9ee2f18562397f68f992028c95d423d6093bd4183100bf7d
MD5 b5ac0b2418aadd9d0d24f96668a690f7
BLAKE2b-256 07ea9d4dc333802347904d1db6fff2ea5c02fab3676aafbf2bb218360715b063

See more details on using hashes here.

File details

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

File metadata

  • Download URL: orrin_sdk-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c19838aad6cc02bfda4aa0c5519b5450d276110bf51e884ba550916689ea98
MD5 806244042f9de17513bfb261774da5f1
BLAKE2b-256 d7e6292703cd53accc7120612b676aaa6305662dc58cc47f0e906852b6e7f08f

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