package

class gratipay.models.package.Package(record)[source]

Represent a gratipackage. :-)

Packages are entities on open source package managers; npm is the only one we support so far. Each package on npm has a page on Gratipay with an URL of the form /on/npm/foo/. Packages can be claimed by Gratipay participants, at which point we create a Team for them under the hood so they can start accepting payments.

url_path

The path part of the URL for this package on Gratipay.

remote_human_url

The URL for the main page for this package on its package manager.

remote_api_url

The main API URL for this package on its package manager.

classmethod from_id(id, cursor=None)[source]

Return an existing package based on id.

classmethod from_names(package_manager, name, cursor=None)[source]

Return an existing package based on package manager and package names.

classmethod upsert(package_manager, **kw)[source]

Upsert a package. Required keyword arguments:

  • name (string)
  • description (string)
  • emails (list of strings)

Optional keyword argument:

  • cursor
Return None:
delete(cursor=None)[source]

Delete the package, unlinking any team (the team itself lives on) and clearing any claim.