Skip to main content

Odysseus Platform - Python client

This repository contains full source code of the simple Python project capable of uploading log entries or events happening on a backend application - back to the Odysseus Logging Platform.

Once it's added as a dependency of your Python application, it has to be connected with your existing logging system and logs serialization has to be redirected to be able to process them and pass back to the server.

Official home of this package on pypi.org is Odysseus Client.

Disclaimer

Full utilization of the Odysseus Logging Platform services is subject to the proper contract and not part of that client functionality. By using this software you essentially agree that since it's an open-source project you read it and understand all repercussions of using it. Thus you will never claim or call for any compensations or damages in connection with downtime of your own services caused by this software.

Logging Levels

In general all parameters exposed by the library are self-explanatory. The only one that could potentially be a source of questions is the log level. Here are the values then expected with a proper meaning (originally based on ASP.NET Log Levels)

Value Name Description
0 Trace Lowest level, should be used only during development, cause it can potentially print some sensitive info.
1 Debug Typical debugging information with detailed information.
2 Info Mid-level debugging, just general information about activity
3 Success Mid-level debugging, just successful information about activity
4 Warn Logs that describe unexpected and abnormal behavior, potentially some unexpected behaviors happening on other components.
5 Error All kids of errors that prevent the application to continue its operation.
6 Critical Logs of unrecoverable behaviors of the application, including crashes, lack of local disc-space and everything that requires immediate attention of the administrator.

Usage

It's extremely easy to integrate CodeTitans Odysseus Client package with your own project. The client being part of this package has only a single capability to upload any logs entries or custom events back to the backend and correctly identify them online. Follow these 3 simple steps to complete the setup:

  1. Install this package into your current environment:

    $ python3 -m pip odysseus
    
  2. Inside your project import the client class inside your own logging part of the application.

    from odysseus import OdysseusClient
    
  3. Initialize the client with proper credentials, that were given to you, when registered your backend service at Odysseus Logging Platform

    # ...
    # assuming here is your own logging system that captures activities across the whole application
    # initialize the client with received credentials
    
    odysseus = OdysseusClient(app_id='app_XXX', app_key='<key>')
    
  4. Potentially highjack the logging function

    def log_entry(level: LogLevel, tag: str, message: str) -> LogEntry:
    
        # ... other application code removed for clarity ...
        odysseus.log(message=message, severity=LogSeverity(level.value), tag=tag, timestamp=datetime.now(tz=timezone.utc))
    

    also add a helper method for sending events:

    def log_event(name: str, data: Optional[Dict[str, Any]] = None, type: int = 0,
                  stream_id: Optional[UUID] = None, position: Optional[int] = None, meta: Optional[Dict[str, Any]] = None):
        odysseus.event(name=name, data=data, type=type, stream_id=stream_id, position=position, meta=meta)
    

Examples

As described in the chapter above, usage of this logging client would be as easy as calling the two helper functions:

# log regular message
log_entry(LogLevel.DEBUG, __tag, 'Invoking presentation request')

# or logging an event
log_event('invoicing-started', {'requested-for': company.id, 'ref': order.id, 'amount': order.sum_netto})

CodeTitans Sp. z o.o. (2025-)

Metadata

Release files for odysseus 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odysseus 0.1.7
File Size Uploaded
odysseus-0.1.7.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for odysseus 0.1.7
File Interpreter ABI Platform
odysseus-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / odysseus-0.1.7.tar.gz

Download URL odysseus-0.1.7.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e623a97b739ac379bb7fed079849cc17782434941e7f6ae743b45d4c3f10f4f7
BLAKE2b-256 checksum
How to use checksums
c0e7f0337ad0643d0551304b5c59eb77e4683cca18d463192587d93bfe0ac043
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.15

Release files / odysseus-0.1.7-py3-none-any.whl

Download URL odysseus-0.1.7-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86c118986d9433e630e9004bc569a55ecd368fbea74daa791b994f9e4376fc22
BLAKE2b-256 checksum
How to use checksums
448386214f0040a578fa9575e308f83a19db2a28a3103d5a1d458f4f51d13d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page