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.1

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.1
File Size Uploaded Provenance Actions
clld_glottologfamily_plugin-5.0.1.tar.gz 12.9 kB Without provenance Details for clld_glottologfamily_plugin-5.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 25.8 kB

Release files / clld_glottologfamily_plugin-5.0.1.tar.gz

Download URL clld_glottologfamily_plugin-5.0.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b367087edc3484899c3f9fe57bd531295aaaf12fed89c348cee52b43423eb3e6
BLAKE2b-256 checksum
How to use checksums
6cb0df93a13fd831a0df2110898c1b82bf1fbbda268512a00e08a9f7ba568234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

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

Security for clld-glottologfamily-plugin 5.0.1

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