nimblebox logo
Docs
v3.3.1b

nbox.init

Initialization

This file loads first and is responsible for setting up all the global networking items.

Build systems are an extremely important detail of any software project. When they work, they can feel like magic: you execute a command, and after a series of potentially complicated steps, a working binary (or other artifact) is produced! When they don't work, they can feel like confusing, non-transparent roadblocks that you wish didn't exist. This is typical for any powerful tool: magic or a headache depending on the day and the task.

Functions

iconfunction__create_channel
[source]
(channel_name:str)
Parameters
  • channel_name -

    Name of the channel, used for logging.

Create a gRPC channel with the Webserver, this will return webserver_channel with credentials and ssl.

Returns:

  • grpc.Channel: A gRPC channel with credentials and ssl.
iconfunctionget_job_stub
[source]

Create a gRPC stub with the NBX Webserver, this will initialise nbox_grpc_stub object which is globally accesible as nbox.nbox_grpc_stub. If you find yourself using this function, you might want to reconsider your design.

Returns:

  • WSJobServiceStub: A gRPC stub with the NBX Webserver.
iconfunctionget_serving_stub
[source]

Create a gRPC stub with the NBX Serving, this will initialise nbox_serving_grpc_stub object which is globally accesible as nbox.nbox_serving_grpc_stub. If you find yourself using this function, you might want to reconsider your design.

Returns:

  • ServingServiceStub: A gRPC stub with the NBX Serving.
iconfunctionget_model_stub
[source]

Create a gRPC stub with the NBX Serving, this will initialise nbox_model_grpc_stub object which is globally accesible as nbox.nbox_model_grpc_stub. If you find yourself using this function, you might want to reconsider your design.

Returns:

  • ModelServiceStub: A gRPC stub with the NBX Serving.
iconfunctioncreate_webserver_subway
[source]
(version:str,session:requests.Session)
Parameters
  • version -

    Version of the API to use. Defaults to "v1".

  • session -

    Session to use for the API calls. Defaults to None.

Create a Subway object for the NBX Webserver for a given workspace. This is a wrapper around the OpenAPI spec plublished by NBX Webserver. It loads the JSON object in Sub30 which allows accesing REST APIs with python "." (dot) notation. If you find yourself using this function, you might want to reconsider your design.

Returns:

  • Sub30: A Subway object for the NBX Webserver.
iconfunctionnbox_version_update
[source]

Function to check if the current version of nbox is the latest version. If not, it will print a warning message to the user. This function is called on import of the nbox module.

nbox SDKnbox provides built in access to all the APIs and packages them in the most user friendly manner.Star 0