pixano.app.serve
¶
App(data_dir='.', *, library_dir=None, media_dir=None, models_dir=None, aws_endpoint=None, aws_region=None, aws_access_key=None, aws_secret_key=None, host='127.0.0.1', port=7492, pixano_inference_url=None)
¶
The Pixano app.
Attributes:
| Name | Type | Description |
|---|---|---|
app |
FastAPI
|
FastAPI App. |
config |
Config
|
App config. |
server |
Server
|
App server. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_dir
|
str
|
Root data directory containing library/, media/, and models/ subdirectories. |
'.'
|
library_dir
|
str | None
|
Override for the library directory. If not provided, defaults to data_dir/library. |
None
|
media_dir
|
str | None
|
Override for the media directory. If not provided, defaults to data_dir/media. |
None
|
models_dir
|
str | None
|
Override for the models directory. If not provided, defaults to data_dir/models. |
None
|
aws_endpoint
|
str | None
|
S3 endpoint URL, use 'AWS' if not provided. Used if library_dir is an S3 path. |
None
|
aws_region
|
str | None
|
S3 region name, not always required for private storages. Used if library_dir is an S3 path. |
None
|
aws_access_key
|
str | None
|
S3 AWS access key. Used if library_dir is an S3 path. |
None
|
aws_secret_key
|
str | None
|
S3 AWS secret key. Used if library_dir is an S3 path. |
None
|
host
|
str
|
App host. |
'127.0.0.1'
|
port
|
int
|
App port. |
7492
|
pixano_inference_url
|
str | None
|
Pixano inference URL if any. |
None
|
Source code in pixano/app/serve.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
display(height=1000)
¶
Display the Pixano app.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height
|
int
|
Frame height. |
1000
|
Source code in pixano/app/serve.py
get_env()
¶
Get the app's current running environment.
Returns:
| Type | Description |
|---|---|
str
|
Running environment. |