requirementslib.models.project module

class requirementslib.models.project.FileDifference(default, develop)

Bases: tuple

default

Alias for field number 0

develop

Alias for field number 1

class requirementslib.models.project.Project(root)[source]

Bases: object

add_line_to_pipfile(line, develop)[source]
contains_key_in_pipfile(key)[source]
difference_lockfile(lockfile)[source]

Generate a difference between the current and given lockfiles.

Returns a 2-tuple containing differences in default in develop sections.

Each element is a 2-tuple of dicts. The first, inthis, contains entries only present in the current lockfile; the second, inthat, contains entries only present in the given one.

If a key exists in both this and that, but the values differ, the key is present in both dicts, pointing to values from each file.

is_synced()[source]
lockfile
lockfile_location
pipfile
pipfile_location
remove_keys_from_lockfile(keys)[source]
remove_keys_from_pipfile(keys, default, develop)[source]
class requirementslib.models.project.ProjectFile(location, line_ending, model)[source]

Bases: object

A file in the Pipfile project.

dumps()[source]
classmethod read(location, model_cls, invalid_ok=False)[source]
write()[source]
class requirementslib.models.project.SectionDifference(inthis, inthat)

Bases: tuple

inthat

Alias for field number 1

inthis

Alias for field number 0

requirementslib.models.project.preferred_newlines(f)[source]