Skip to main content

cdstarcat

Build Status PyPI

Manage objects in a CDSTAR instance using a local catalog.

Install

Running

pip install cdstarcat

will install the cdstarcat package as well as a commandline interface cdstarcat.

For developing cdstarcat, clone the repository clld/cdstarcat and run

cd cdstarcat
pip install -r requirements.txt

CLI

Run

cdstarcat --help

to get a list of available subcommands, and

cdstarcat help SUBCOMMAND

to get usage information for a particular subcommand.

cdstarcat API

Typically, cdstarcat will be used programmatically, to implement recurring media file maintenance tasks within projects - such as uploading media files for a new submission to Dictionaria.

In the simplest case this could look as follows:

import os
from cdstarcat import Catalog

def upload(directory):
    with Catalog(
        os.environ['CDSTAR_CATALOG'],
        cdstar_url=os.environ['CDSTAR_URL'],
        cdstar_user=os.environ['CDSTAR_USER'],
        cdstar_pwd=os.environ['CDSTAR_PWD']
    ) as cat:
        md = {
            'collection': 'PROJECT NAME',
            'path': '%s' % directory,
        }
        for fname, created, obj in cat.create(directory, md):
            print('{0} -> {1}'.format(fname, obj.id))

Release files for cdstarcat 1.6.0

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

Source distribution (sdist)

Source distribution for cdstarcat 1.6.0
File Size Uploaded
cdstarcat-1.6.0.tar.gz 18.1 kB Details

Built distribution (wheel)

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

Total release size: 35.9 kB

Release files / cdstarcat-1.6.0.tar.gz

Download URL cdstarcat-1.6.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7cdf4d8018aac31707917e795ebcae478cb482d855dd5c773bc38238ae0972ae
BLAKE2b-256 checksum
How to use checksums
558415309a456d7326a5fa01319863b604ad6de78af6b525ec1745c4f1cbca3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / cdstarcat-1.6.0-py3-none-any.whl

Download URL cdstarcat-1.6.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0852712788217266325507395240231dd4424b8e411445ee68c5771034fe6fda
BLAKE2b-256 checksum
How to use checksums
28ecfbea02f6956f7ee8c29535daebeeb85f5aeada39a39262045e17844ccfd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

1 release file

0.2.0

1 release file

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