Find a file
Benedith Mulongo 42c2b7693e
Some checks are pending
Python CI / test (push) Waiting to run
Python CI / build (push) Blocked by required conditions
Python CI / publish (push) Blocked by required conditions
test artifacts2
2024-10-11 16:31:58 +02:00
.github/workflows test artifacts2 2024-10-11 16:31:58 +02:00
norduniclient Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
tests Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
.gitignore Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
.gitlab-ci.yml Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
LICENSE Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
norduniclient-package.md Update readme.md 2024-10-11 15:55:53 +02:00
noxfile.py Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
poetry.lock Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
pyproject.toml Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00
README.md Update readme.md 2024-10-11 15:55:53 +02:00
release_for_neo4j_version.sh Improve norduniclient from nordunet 2024-10-10 16:37:08 +02:00

python-norduniclient

PyPI

Neo4j database client for NORDUnet network inventory

Compatibility

Tools Version
neo4j DB 4.4.x
neo4j 4.4.x
neomodel 5.0.x

Setup

poetry shell
poetry install

Running tests

Add the following environment variables:

NEO4J_HTTP_PORT=7474
NEO4J_BOLT_PORT=7687
NEO4J_HOSTNAME=xx
NEO4J_USER=xx
NEO4J_PASSWORD=xx

and run

poetry run python -m unittest discover

or save the environment variables in a local file .env and run it with dotenvx as follows:

dotenvx run -- poetry run python -m unittest discover

or

nox -rs tests
nox -rs tests_dotenv

Installation

pip install norduniclient

python3 -m pip install --index-url https://platform.sunet.se/api/packages/benedith/pypi/simple/ --extra-index-url https://pypi.org/simple/ norduniclient

python3 -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ jolieprinter

Usage

import norduniclient as nc

NODE_META_TYPE_CHOICES = zip(nc.META_TYPES, nc.META_TYPES)

print("nc.META_TYPES=", nc.META_TYPES)

Poetry guide

poetry run python [operation]

Add depenency

Add a new lib

poetry add <library>

Remove a lib

poetry remove <library>

Get venv path

poetry run which python

Show dependencies

poetry show
poetry run pip list

List configuratiom

poetry config --list

Publish

poetry config repositories.pypi https://upload.pypi.org/legacy/
poetry config pypi-token.pypi [token]
poetry publish --build --repository pypi
poetry publish --build --repository testpypi