Skip to main content

Library containing artifact type enums and functions

Project description

PolySwarm Artifact

pipeline status coverage report

Python package for mapping artifact types to the ArtifactType enum in the BountyRegistry contract.

Supports python3 >=3.5.2 and >=3.6.5.

Versions in this schema

Everything in here is meant to be a part of an evolving schema. No versions, but all changes are additions only.

Use non-null and required carefully

Since we cannot remove fields, when a field is no longer useful, it needs to be nullable. Unfortunately we cannot add nullable at a later date, as that would invalidate new schemas when being read by an old

We can easily remove required fields, but we cannot add more. Doing so would invalidated old schemas.

Schema object

Schema objects possess the following methods and attributes:

dict() returns a dictionary of the model's fields and values json() returns a JSON string representation dict() copy() returns a deep copy of the model parse_obj() a utility for loading any object into a model with error handling if the object is not a dictionary parse_raw() a utility for loading strings of numerous formats parse_file() like parse_raw() but for files from_orm() loads data into a model from an arbitrary class schema() returns a dictionary representing the model as JSON Schema schema_json() returns a JSON string representation of schema() construct() a class method for creating models without running validation __fields_set__ Set of names of fields which were set when the model instance was initialised __fields__ a dictionary of the model's fields __config__ the configuration class for the model

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

polyswarm-artifact-2.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

polyswarm_artifact-2.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file polyswarm-artifact-2.0.0.tar.gz.

File metadata

  • Download URL: polyswarm-artifact-2.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for polyswarm-artifact-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8ec15c1b45610a58474f782e141c16ce9112adbb73fb17907fc33cbdc3ec55b0
MD5 dfa8295f964d3eb39dc75c67b441a77f
BLAKE2b-256 a6a497cd5c2a93259b1733040ffadb2fab6b05c4a8cd58863bd3c78ca65a05de

See more details on using hashes here.

File details

Details for the file polyswarm_artifact-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polyswarm_artifact-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8b89e8baa48372ef6baf4ea2e0fad76c5ecaaa50f675465f129ccb21816fac
MD5 50e7fe193ebfac3542d78477af7f153c
BLAKE2b-256 037c87da05cec638fc6d545e8f4556f583a3b3a390b4eb66de93f4f734bfa52e

See more details on using hashes here.

Supported by

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