Skip to main content

OpenRepos.net web client

Project description

OpenRepos.net Web Client

pipeline status coverage report documentation PyPI

openrepos-webclient is a Python package to interface the OpenRepos.net website in an automated way.

Installation

To install, run from the repository root:

python3 -m pip install --user .

or install it from PyPi:

python3 -m pip install --user openrepos

(Run sudo apt-get update && sudo apt-get -y install python3-pip && pip3 install --user -U pip if it complains about pip not being found)

You will also need to install at least one selenium-compatible browser with webdriver, for example Firefox together with geckodriver.

If you want to run openrepos headlessly, you will also need Xvfb.

What can openrepos do?

OpenRepos Credentials

Define your OpenRepos.net login credentials as environment variables. You can either run this in each terminal session once before running the openrepos command:

export OPENREPOS_USERNAME=myuser OPENREPOS_PASSWORD=mypass

... or you can put the above in a file (say openrepos-credentials.sh) and then source this file, which is safer as you don't specify any credentials on the command-line:

source openrepos-credentials.sh

Executing

If running just openrepos errors out with something like command not found, then just run python3 -m openrepos instead.

Create a new app

This command creates a new SailfishOS app TestApp in the Libraries category.

openrepos -i new-app -n TestApp -p SailfishOS -c Libraries

Upload RPMs to an app

This command uploads all RPMs in the current directory to an app on OpenRepos called TestApp:

openrepos upload-rpm -n TestApp *.rpm

If you want to create the app if it doesn't exist yet, you have to provide the same metadata as above for new-app:

openrepos upload-rpm -n TestApp -p SailfishOS -c Libraries *.rpm

Using this to automate uploading RPMs to OpenRepos in GitLab CI

This package was designed to automate RPM upload to OpenRepos.net. To do that in GitLab CI, you can include the file openrepos-upload-rpm.gitlab-ci.yml from this repository in your CI config. The file contains an example of how to do that.

Troubleshooting

If you experience problems and want to debug them, you can run openrepos interactively (--interacitve) and verbosely (-vvv):

openrepos --interactive -vvv upload-rpm ...

This will ask you before every step and tell you what's going on.

Documentation

Documentation of the openrepos package can be found here on GitLab.

Also, the command-line help page openrepos -h is your friend.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openrepos-webclient-1.4.1.tar.gz (24.1 kB view details)

Uploaded Source

File details

Details for the file openrepos-webclient-1.4.1.tar.gz.

File metadata

  • Download URL: openrepos-webclient-1.4.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for openrepos-webclient-1.4.1.tar.gz
Algorithm Hash digest
SHA256 2ddb018e7fec30a59a8df8814a550ff3db3db4eeadf3e7fda2c6a12f9423046e
MD5 e5589d4ae13fc86fd080b0709c99fd87
BLAKE2b-256 5c988ca0a3dc1cbac4aa5391d74b3f07fb677ca590825a35d14f229b67f76898

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page