Skip to content
Snippets Groups Projects

Add and fix more type hints

Compare and
25 files
+ 702
377
Compare changes
  • Side-by-side
  • Inline
Files
25
#!/usr/bin/env python3
"""A small example to get started with caosdb-pylib.
# This file is a part of the LinkAhead Project.
#
# Copyright (C) 2024 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2024 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""A small example to get started with linkahead-pylib.
Make sure that a `pylinkahead.ini` is readable at one of the expected locations.
"""
@@ -17,12 +35,12 @@ def reconfigure_connection():
def main():
"""Shows a few examples how to use the CaosDB library."""
"""Shows a few examples how to use the LinkAhead library."""
conf = dict(db.configuration.get_config().items("Connection"))
print("##### Config:\n{}\n".format(conf))
if conf["cacert"] == "/path/to/caosdb.ca.pem":
print("Very likely, the path the the TLS certificate is not correct, "
print("Very likely, the path to the TLS certificate is not correct, "
"please fix it.")
# Query the server, the result is a Container
Loading