https://github.com/dbpedia/databus-python-client
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: dbpedia
- Language: Python
- Default Branch: main
- Size: 49.8 KB
Statistics
- Stars: 3
- Watchers: 20
- Forks: 4
- Open Issues: 4
- Releases: 0
Metadata Files
README.md
Databus Client Python
Install
bash
python3 -m pip install databusclient
CLI Usage
bash
databusclient --help
```man Usage: databusclient [OPTIONS] COMMAND [ARGS]...
Options: --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the specified shell. --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the specified shell, to copy it or customize the installation. --help Show this message and exit.
Commands: deploy downoad ```
Deploy command
databusclient deploy --help
```
Usage: databusclient deploy [OPTIONS] DISTRIBUTIONS...
Arguments: DISTRIBUTIONS... distributions in the form of List[URL|CV|fileext|compression|sha256sum:contentlength] where URL is the download URL and CV the key=value pairs (_ separted) content variants of a distribution, fileExt and Compression can be set, if not they are inferred from the path [required]
Options:
--versionid TEXT target databus version/dataset identifier of the form
Examples of using deploy command
databusclient deploy --versionid https://databus.dbpedia.org/user1/group1/artifact1/2022-05-18 --title title1 --abstract abstract1 --description description1 --license http://dalicc.net/licenselibrary/AdaptivePublicLicense10 --apikey MYSTERIOUS 'https://raw.githubusercontent.com/dbpedia/databus/master/server/app/api/swagger.yml|type=swagger'
```
databusclient deploy --versionid https://dev.databus.dbpedia.org/denis/group1/artifact1/2022-05-18 --title "Client Testing" --abstract "Testing the client...." --description "Testing the client...." --license http://dalicc.net/licenselibrary/AdaptivePublicLicense10 --apikey MYSTERIOUS 'https://raw.githubusercontent.com/dbpedia/databus/master/server/app/api/swagger.yml|type=swagger'
A few more notes for CLI usage:
- The content variants can be left out ONLY IF there is just one distribution
- For complete inferred: Just use the URL with
https://raw.githubusercontent.com/dbpedia/databus/master/server/app/api/swagger.yml - If other parameters are used, you need to leave them empty like
https://raw.githubusercontent.com/dbpedia/databus/master/server/app/api/swagger.yml||yml|7a751b6dd5eb8d73d97793c3c564c71ab7b565fa4ba619e4a8fd05a6f80ff653:367116
- For complete inferred: Just use the URL with
Module Usage
Step 1: Create lists of distributions for the dataset
```python from databusclient import create_distribution
create a list
distributions = []
minimal requirements
compression and filetype will be inferred from the path
this will trigger the download of the file to evaluate the shasum and content length
distributions.append( create_distribution(url="https://raw.githubusercontent.com/dbpedia/databus/master/server/app/api/swagger.yml", cvs={"type": "swagger"}) )
full parameters
will just place parameters correctly, nothing will be downloaded or inferred
distributions.append( createdistribution( url="https://example.org/some/random/file.csv.bz2", cvs={"type": "example", "realfile": "false"}, fileformat="csv", compression="bz2", sha256lengthtuple=("7a751b6dd5eb8d73d97793c3c564c71ab7b565fa4ba619e4a8fd05a6f80ff653", 367116) ) ) ```
A few notes:
- The dict for content variants can be empty ONLY IF there is just one distribution
- There can be no compression if there is no file format
Step 2: Create dataset
```python from databusclient import create_dataset
minimal way
dataset = createdataset( versionid="https://dev.databus.dbpedia.org/denis/group1/artifact1/2022-05-18", title="Client Testing", abstract="Testing the client....", description="Testing the client....", license_url="http://dalicc.net/licenselibrary/AdaptivePublicLicense10", distributions=distributions, )
with group metadata
dataset = createdataset( versionid="https://dev.databus.dbpedia.org/denis/group1/artifact1/2022-05-18", title="Client Testing", abstract="Testing the client....", description="Testing the client....", licenseurl="http://dalicc.net/licenselibrary/AdaptivePublicLicense10", distributions=distributions, grouptitle="Title of group1", groupabstract="Abstract of group1", groupdescription="Description of group1" ) ```
NOTE: To be used you need to set all group parameters, or it will be ignored
Step 3: Deploy to databus
```python from databusclient import deploy
to deploy something you just need the dataset from the previous step and an APIO key
API key can be found (or generated) at https://$$DATABUS_BASE$$/$$USER$$#settings
deploy(dataset, "mysterious api key") ```
Owner
- Name: DBpedia
- Login: dbpedia
- Kind: organization
- Email: dbpedia-discussion@lists.sourceforge.net
- Website: http://dbpedia.org
- Repositories: 119
- Profile: https://github.com/dbpedia
GitHub Events
Total
- Watch event: 1
- Issue comment event: 1
- Push event: 2
- Pull request event: 2
Last Year
- Watch event: 1
- Issue comment event: 1
- Push event: 2
- Pull request event: 2
Dependencies
- attrs 22.2.0 develop
- black 22.12.0 develop
- exceptiongroup 1.1.0 develop
- iniconfig 2.0.0 develop
- mypy-extensions 1.0.0 develop
- packaging 23.0 develop
- pathspec 0.11.0 develop
- platformdirs 3.0.0 develop
- pluggy 1.0.0 develop
- pytest 7.2.1 develop
- tomli 2.0.1 develop
- typing-extensions 4.5.0 develop
- certifi 2022.12.7
- charset-normalizer 3.0.1
- click 8.1.3
- colorama 0.4.6
- idna 3.4
- requests 2.28.2
- typer 0.6.1
- urllib3 1.26.14
- black ^22.6.0 develop
- python ^3.9
- requests ^2.28.1
- typer ^0.6.1
- Gr1N/setup-poetry v8 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite