Skip to content

Install a client library

Install the gateway's client library for your language. What each library offers is in its reference: C#, Python, TypeScript.

C

From Gitea NuGet Registry

Add the Virtufin package source with a personal access token (scope: read:packages):

dotnet nuget add source https://nuget.haenerconsulting.com/api/packages/virtufin/nuget/index.json \
  --name Virtufin --username <your-gitea-username> --password <your-gitea-token>

dotnet add package Virtufin.Api.Client

Or configure via NuGet.Config:

<configuration>
  <packageSources>
    <add key="Virtufin" value="https://nuget.haenerconsulting.com/api/packages/virtufin/nuget/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <Virtufin>
      <add key="Username" value="<your-gitea-username>" />
      <add key="ClearTextPassword" value="<your-gitea-token>" />
    </Virtufin>
  </packageSourceCredentials>
</configuration>

From Local Source

<ProjectReference Include="path/to/Virtufin.Api.Client/Virtufin.Api.Client.csproj" />

Python

From Gitea PyPI Registry

Set up authentication with a Gitea personal access token (scope: read:packages):

export PIP_USERNAME=<your-gitea-username>
export PIP_PASSWORD=<your-gitea-token>

pip install virtufin-api \
  --index-url https://pypi.haenerconsulting.com/api/packages/virtufin/pypi/simple/ \
  --extra-index-url https://pypi.org/simple

From Local Source

export PYTHONPATH=/path/to/virtufin-api/src/python

Or install the package. The client requires the generated protobuf stubs in the same directory:

import sys
sys.path.insert(0, '/path/to/virtufin-api/src/python')

from virtufin.api.client import ApiClient

TypeScript

From Gitea npm Registry

Map the @virtufin scope to the registry and add a token (scope: read:package):

cat >> ~/.npmrc <<'EOF'
@virtufin:registry=https://gitea.haenerconsulting.com/api/packages/virtufin/npm/
//gitea.haenerconsulting.com/api/packages/virtufin/npm/:_authToken=<your-gitea-token>
EOF

Use gitea.haenerconsulting.com, not the npm.* alias: Gitea advertises dist.tarball on gitea.* whatever host you query, so the npm.* form fetches metadata authenticated and then follows an unauthenticated redirect for the payload — npm matches tokens by URL prefix.

Then install:

npm install @virtufin/api

From Local Source

{
  "dependencies": {
    "@virtufin/api": "file:path/to/src/typescript"
  }
}