upe.repo.main — Connect and create repositories

New in version 0.2.0.

exception upe.repo.main.NotAllowed

Raised when remote repositories are disabled in upe.config.remote.allowremote.

exception upe.repo.main.BadConfig

Raised when repoconfig.json contains an unvalid value.

class upe.repo.main.repofile(repo)

Edit the repositories file. repo is the name of the repository to be added, edited or deleted.

get()

Get a dictionary with the following information about the repository:

{'url': url, 'port': port, 'reqid': reqid, 'user': user, 'passwd': passwd}
set(properties)

Set the properties of a repository. properties only has to include the attributes to be changed: if you want to change the URL, pass a dictionary {'url': newurl}.

add(properties)

Add a repository with the properties passed. Its name will be the one passed to repofile.

rmrepo()

Delete the repository

rm(key)

Delete the key from the repository.

class upe.repo.main.client(reponame, host[, port=8018])

Get data from a server.

sync()

Fetch the pkginfo.json from the server and add it to the cache.

getpkg(package)

Error

getpkg() is not ready yet.

upe.repo.server — Create a server

New in version 0.2.0.

upe.repo.server.make()

Create a server on the current directory.

class upe.repo.server.package
add(file[, pkginfo='pkginfo.json'])

Add the package file to the repository.

rm(package[, pkginfo='pkginfo.json'])

Delete the package from the repository.

upe.repo.server.run([host='localhost'][, port=8016])

Run the package server on http://host:port. The server must be on the current repository (where you ran server.make()).

class upe.repo.server.getconfig([file='repoconfig.json'])

Read the repoconfig from file.

getbs()

Get block size (used when transfering the package). Returns a dictionary:

{'max': <maxbs>, 'min': <minbs>, 'def': <defbs>}

Table Of Contents

Previous topic

upe.query — Get info about the installed packages

Next topic

Using experimental features