Skip to main content

Django GenomiX

https://badge.fury.io/py/django-genomix.svg https://travis-ci.org/chopdgd/django-genomix.svg?branch=develop https://codecov.io/gh/chopdgd/django-genomix/branch/develop/graph/badge.svg Updates Python 3

Core library for Nexus django projects

Documentation

The full documentation is at https://django-genomix.readthedocs.io.

Quickstart

Install Django GenomiX:

pip install django-genomix

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'genomix',
    ...
)

Features

  1. DisplayChoiceField - display representation values for choice fields in REST APIs.:

from genomix.fields import DisplayChoiceField
from rest_framework import serializers

from . import choices


class ExampleSerializer(serializers.ModelSerializer):

    status = DisplayChoiceField(choices=choices.STATUS_OPTIONS)
  1. UserRelatedField - display username for a REST API with a user relation.:

from django.contrib.auth import get_user_model

from genomix.fields import UserRelatedField
from rest_framework import serializers


class ExampleSerializer(serializers.ModelSerializer):

    user = UserRelatedField(queryset=get_user_model().objects.all())
  1. ContentRelatedField - display ContentType model for a REST API using a generic relation.:

from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType

from genomix.fields import ContentRelatedField
from rest_framework import serializers


class ExampleSerializer(serializers.ModelSerializer):

    content_type = ContentRelatedField(queryset=ContentType.objects.all())
  1. DisplayChoiceFilter - Filter by representation values in a REST API.:

import django_filters
from genomix.filters import DisplayChoiceFilter

from . import choices


class ExampleFilter(django_filters.rest_framework.FilterSet):

    source = DisplayChoiceFilter(choices=choices.SOURCES)

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2017-12-02)

  • First release on PyPI.

  • TimeStampedLabelModel abstract model class

  • UserRelatedField for use in DRF serializers

  • DisplayChoiceField for use in DRF serializers

  • ContentRelatedField for use in DRF serializers

  • DefaultRouter that allows you to extend other routers

  • ModelMixinTestCase that allows you to test abstract model classes

0.2.0 (2017-12-31)

0.2.0 Changelog

  • Added utils function to retrieve data from a URL

  • Added utils function to retrieve compressed data from a URL

0.3.0 (2018-01-04)

0.3.0 Changelog

  • DisplayChoiceFilter for use in django_filters. Filter by diplay fields for a choice field in a REST API

0.4.0 (2018-01-05)

0.4.0 Changelog

  • Improved docs

  • Beta release

0.4.1 (2018-01-09)

0.4.1 Changelog

  • DisplayChoiceFilter fixed coerce method to handle Choices with different display values.

0.5.0 (2018-02-09)

0.5.0 Changelog

  • Updated requirements to the latest.

0.6.0 (2018-04-07)

0.6.0 Changelog

  • Added support for Django 2.0 and Python3.6

  • Dropped support for Django <1.11 and Python 2.7, 3.3, 3.4

0.6.1 (2018-04-18)

0.6.1 Changelog

  • Upgraded 3rd party libs

0.6.2 (2018-05-16)

0.6.2 Changelog

  • Updated setup.py to read install_requires from requirements.txt

0.6.3 (2018-08-13)

0.6.3 Changelog

  • Updated 3rd party requirements. Some requirements had changed so it was causing failures

0.6.4 (2018-10-29)

0.6.4 Changelog

  • Updated deps and adjusted for new flake8 reqs

0.6.5 (2019-02-07)

0.6.5 Changelog

  • Updated deps

0.6.6 (2019-04-10)

0.6.6 Changelog

  • Updated deps

  • Updated travis to use xenial distribution. Django 2.1 dropped support for SQLite < 3.8.3

0.6.7 (2019-05-30)

0.6.7 Changelog

  • Updated deps

0.6.8 (2019-07-26)

0.6.8 Changelog

  • Updated deps

0.6.9 (2019-08-09)

0.6.9 Changelog

  • Updated deps

0.6.10 (2019-09-09)

0.6.10 Changelog

  • Updated deps

1.0.0 (2019-11-01)

1.0.0 Changelog

  • Made gene symbol unique

  • First release used in production in DGD

1.1.0 (2019-11-26)

1.1.0 Changelog

  • Added disabled update method queryset base class

Metadata

Release files for django-genomix 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-genomix 1.1.0
File Size Uploaded Provenance Actions
django-genomix-1.1.0.tar.gz 9.6 kB Without provenance Details for django-genomix-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-genomix 1.1.0
File Interpreter ABI Platform Actions
django_genomix-1.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for django_genomix-1.1.0-py2.py3-none-any.whl

Total release size: 18.2 kB

Release files / django-genomix-1.1.0.tar.gz

Download URL django-genomix-1.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0d544fc268e8a7c205b4f8532c856792be67b50367dc690fee110257ce08fc63
BLAKE2b-256 checksum
How to use checksums
6c78c78330e104f5e5dbec060bd0a66a97f3d9fadcb2e566bcd234a1cd26564b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9

Release files / django_genomix-1.1.0-py2.py3-none-any.whl

Download URL django_genomix-1.1.0-py2.py3-none-any.whl
Size 8.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
869b38dda2a845f84a402bc78c689595f7aa263f0c5f40d9bff0e1837711768a
BLAKE2b-256 checksum
How to use checksums
d0d146d7cc350d343064693dfb7a845db5e27cffc876eb8d6cc465ad8bd6384c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9

Security for django-genomix 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page