fiftyone.core.service#
FiftyOne Services.
Exceptions:
Base class for service-related exceptions. |
|
|
Exception raised when a network-bound service fails to bind to a port. |
Exception raised when the service executable is not found on disk. |
Classes:
|
Interface for FiftyOne services. |
Base class for services that support multiple clients. |
|
Service that controls the underlying MongoDB database. |
|
|
Service that controls the FiftyOne web server. |
- exception fiftyone.core.service.ServiceException#
Bases:
ExceptionBase class for service-related exceptions.
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception fiftyone.core.service.ServiceListenTimeout(name, port=None)#
Bases:
ServiceExceptionException raised when a network-bound service fails to bind to a port.
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception fiftyone.core.service.ServiceExecutableNotFound#
Bases:
ServiceExceptionException raised when the service executable is not found on disk.
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class fiftyone.core.service.Service#
Bases:
objectInterface for FiftyOne services.
All services must define a
commandproperty.Services are run in an isolated Python subprocess (see
service/main.py) to ensure that they are shut down when the main Python process exits. Thecommandandworking_dirproperties control the execution of the service in the subprocess.Attributes:
Methods:
start()Starts the service.
stop()Stops the service.
wait()Waits for the service to exit and returns its exit code.
- service_name = None#
- working_dir = '.'#
- allow_headless = False#
- property command#
- property env#
- start()#
Starts the service.
- stop()#
Stops the service.
- wait()#
Waits for the service to exit and returns its exit code.
- class fiftyone.core.service.MultiClientService#
Bases:
ServiceBase class for services that support multiple clients.
Attributes:
Methods:
start()Searches for a running instance of this service, or starts one if no instance is found.
stop()Disconnects from the service without actually stopping it.
wait()Waits for the service to exit and returns its exit code.
- attached = False#
- start()#
Searches for a running instance of this service, or starts one if no instance is found.
- stop()#
Disconnects from the service without actually stopping it.
- allow_headless = False#
- property command#
- property env#
- service_name = None#
- wait()#
Waits for the service to exit and returns its exit code.
- working_dir = '.'#
- class fiftyone.core.service.DatabaseService#
Bases:
MultiClientServiceService that controls the underlying MongoDB database.
Attributes:
Methods:
Returns the path to the mongod executable.
start()Searches for a running instance of this service, or starts one if no instance is found.
stop()Disconnects from the service without actually stopping it.
wait()Waits for the service to exit and returns its exit code.
- service_name = 'db'#
- allow_headless = True#
- MONGOD_EXE_NAME = 'mongod'#
- property command#
- property port#
- static find_mongod()#
Returns the path to the mongod executable.
- attached = False#
- property env#
- start()#
Searches for a running instance of this service, or starts one if no instance is found.
- stop()#
Disconnects from the service without actually stopping it.
- wait()#
Waits for the service to exit and returns its exit code.
- working_dir = '.'#
- class fiftyone.core.service.ServerService(port, address=None, do_not_track=False)#
Bases:
ServiceService that controls the FiftyOne web server.
Attributes:
Methods:
start()Starts the service.
stop()Stops the service.
wait()Waits for the service to exit and returns its exit code.
- service_name = 'server'#
- working_dir = '/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/fiftyone/server'#
- allow_headless = True#
- start()#
Starts the service.
- property command#
- property port#
- property address#
- property env#
- stop()#
Stops the service.
- wait()#
Waits for the service to exit and returns its exit code.