Fossology objects

The Python objects derived from the REST data.

class fossology.obj.Agents(bucket, copyright_email_author, ecc, keyword, mimetype, monk, nomos, ojo, package, **kwargs)

FOSSology agents.

Represents the agents currently configured for a given user.

Parameters:
  • bucket (boolean) – run bucket agent on every upload

  • copyright_email_author (boolean) – run copyright_email_author agent on every upload

  • ecc (boolean) – run ecc agent on every upload

  • keyword (boolean) – run keyword agent on every upload

  • mimetype (boolean) – run mimetype agent on every upload

  • monk (boolean) – run monk agent on every upload

  • nomos (boolean) – run nomos agent on every upload

  • ojo (boolean) – run ojo agent on every upload

  • package (boolean) – run package agent on every upload

  • kwargs (key word argument) – handle any other agent provided by the fossology instance

class fossology.obj.ApiInfo(name, description, version, security, contact, license, fossology, **kwargs)

FOSSology API info.

class fossology.obj.ApiLicense(name, url)

FOSSology API License.

class fossology.obj.File(hash, findings, **kwargs)

FOSSology file response from filesearch.

class fossology.obj.FileInfo(view_info, meta_info, package_info, tag_info, reuse_info, **kwargs)

FOSSology file info response.

class fossology.obj.Findings(scanner: list, conclusion: list | None = None, copyright: list | None = None, **kwargs)

FOSSology license findings.

class fossology.obj.Folder(id, name, description, parent, **kwargs)

FOSSology folder.

Represents a FOSSology folder.

Parameters:
  • id – the ID of the folder

  • name – the name of the folder

  • description – further information about the folder

  • parent – the ID of the parent folder

classmethod from_json(json_dict)

Parse folder from API v1 response

classmethod from_json_v2(json_dict)

Parse folder from API v2 response

class fossology.obj.FossologyServer(version, branchName, commitHash, commitDate, buildDate)

FOSSology server info.

class fossology.obj.GetBulkHistory(bulkId: int, clearingEventId: int, text: str, matched: bool, tried: bool, addedLicenses: Iterable[str], removedLicenses: Iterable[str], **kwargs)

Bulk history.

class fossology.obj.GetClearingHistory(date: str, username: str, scope: str, type: str, addedLicenses: Iterable[str], removedLicenses: Iterable[str], **kwargs)

Clearing history.

class fossology.obj.GetPrevNextItem(prevItemId: int, nextItemId: int, **kwargs)

PrevNext item for the clearing history.

class fossology.obj.Group(id, name, **kwargs)

FOSSology group.

class fossology.obj.Hash(sha1, md5, sha256, size, **kwargs)

FOSSology hash.

class fossology.obj.HealthInfo(status, scheduler, db, **kwargs)

FOSSology server health info.

class fossology.obj.Job(id, name, queueDate, uploadId, userId, groupId, eta, status, **kwargs)

FOSSology job.

class fossology.obj.JobDownload(text: str, link: str, **kwargs)

FOSSology job download.

class fossology.obj.JobQueue(jobQueueId: int, jobQueueType: str, startTime: str, endTime: str, status: str, itemsProcessed: int, log: str, dependencies: list[int], itemsPerSec: int, canDoActions: bool, isInProgress: bool, isReady: bool, download: JobDownload, **kwargs)

FOSSology job queue.

class fossology.obj.License(shortName, fullName, text, url, risk, isCandidate, id=None, **kwargs)

FOSSology license.

class fossology.obj.Obligation(id, topic, type, text, classification, comment, **kwargs)

FOSSology license obligation.

class fossology.obj.PermGroups(perm: str, group_pk: str, group_name: str)

GroupIds with their respective permissions for a upload.

class fossology.obj.SearchResult(upload, uploadTreeId, filename, **kwargs)

Search result.

class fossology.obj.ShowJob(jobId: int, jobName: str, jobQueue: list[JobQueue], uploadId: int)

FOSSology job.

class fossology.obj.Status(status)

FOSSology server status.

class fossology.obj.Summary(id, uploadName, mainLicense, uniqueLicenses, totalLicenses, uniqueConcludedLicenses, totalConcludedLicenses, filesToBeCleared, filesCleared, clearingStatus, copyrightCount, **kwargs)

FOSSology upload summary.

class fossology.obj.Upload(folderid, foldername, id, description, uploadname, uploaddate, assignee=None, assigneeDate=None, closingDate=None, hash=None, **kwargs)

FOSSology upload.

class fossology.obj.UploadCopyrights(copyright: str, filePath: list[str], **kwargs)

Copyright findings in a FOSSology upload.

class fossology.obj.UploadLicenses(filePath: str, findings: dict, **kwargs)

FOSSology upload licenses.

class fossology.obj.UploadPermGroups(publicPerm: str, permGroups: list, **kwargs)

Upload permissions.

class fossology.obj.User(id: int, name: str, description: str, email: str | None = None, accessLevel: int | None = None, rootFolderId: int | None = None, emailNotification: str | None = None, default_group: str | None = None, agents: Agents | None = None, **kwargs: dict)

FOSSology user.

class fossology.obj.UserGroupMember(user: User, group_perm: int, **kwargs: dict)

FOSSology group member.