Skip to main content

clld-glottologfamily-plugin

clld plugin, adding language families from Glottolog to a clld app to allow for better navigation and visualization.

Build Status PyPI

Usage

To equip a Language model with a family relation, the model should inherit from clld_glottologfamily_plugin.models.HasFamilyMixin. This relation can be populated upon database initialization calling clld_glottologfamily_plugin.util.load_families.

The families assigned in this way have an associated icon which can be used as map marker. To make this easier, a custom IMapMarker may inherit from clld_glottologfamily_plugin.util.LanguageByFamilyMapMarker.

Associated DataTable columns suitable for tables listing Language objects can be used as follows:

from clld.web.datatables.language import Languages
from clld_glottologfamily_plugin.datatables import FamilyCol, MacroareaCol
from clld_glottologfamily_plugin.models import Family

from models import CustomLanguage


class LanguagesWithFamily(Languages):
    def base_query(self, query):
        return query.outerjoin(Family)  # note: isolates will have no related family!

    def col_defs(self):
        res = Languages.col_defs(self)
        res.append(MacroareaCol(self, 'macroarea', language_cls=CustomLanguage))
        res.append(FamilyCol(self, 'family', language_cls=CustomLanguage))
        return res

Assigning families

  1. Family information is retrieved from Glottolog, based on the id attribute of a language. This will only work if id is either a glottocode or an ISO 639-3 code.

  2. If no related family is found, None will be assigned - rather than a dummy isolates family or individual one-member families derived from the language.

Metadata

Release files for clld-glottologfamily-plugin 5.0.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 clld-glottologfamily-plugin 5.0.0
File Size Uploaded Provenance Actions
clld_glottologfamily_plugin-5.0.0.tar.gz 13.2 kB Without provenance Details for clld_glottologfamily_plugin-5.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clld-glottologfamily-plugin 5.0.0
File Interpreter ABI Platform Actions
clld_glottologfamily_plugin-5.0.0-py3-none-any.whl Python 3 none any Details for clld_glottologfamily_plugin-5.0.0-py3-none-any.whl

Total release size: 26.0 kB

Release files / clld_glottologfamily_plugin-5.0.0.tar.gz

Download URL clld_glottologfamily_plugin-5.0.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
82a505a50ef6ed22cb582e4fb52a6e330a6c743aa5ed6c9f9d03049298d15169
BLAKE2b-256 checksum
How to use checksums
4124b7ba5c8a62e06706c9b903fe278f3e36aac6959b8bbc49e5ec4f3d629a5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / clld_glottologfamily_plugin-5.0.0-py3-none-any.whl

Download URL clld_glottologfamily_plugin-5.0.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eec01b9d751cd47344950f2ffbb9ac6069253fd7c7814615409bcf16e336dc5c
BLAKE2b-256 checksum
How to use checksums
ffa7f402adaaef6be92d502cd8e32efa5154191b071a94f5bd457583a65b73f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for clld-glottologfamily-plugin 5.0.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