Skip to main content

FlexiblePlace

This package defines the FlexiblePlace object, which primarily does two things:

  1. Compare two FlexiblePlace objects and calculate a score that represents the likelihood that the two locations are the same place (compare_places).
  2. Combine a list of FlexiblePlace objects into a single FlexiblePlace object that represents the closest match to all of the FlexiblePlace objects provided (combine_flexible_places).

Initialization

The FlexiblePlace object is effectively a wrapper class of a string array. This object can be instantiated by providing either a string representation of a location (e.g. 'Walla Walla, Washington, United States'), or a string array representation of a location (e.g. ['Walla Walla', 'Washington', 'United States']). The Python version of this class also has the ability to lookup and add the FamilySearch "place description" (effectively an ID associated with a singular geographical location the FamilySearch database).

from FlexiblePlace.src.FlexiblePlace import FlexiblePlace

fp1 = FlexiblePlace("Walla Walla, Washington, United States")
print(fp1) # Walla Walla, Washington, United States

fp2 = FlexiblePlace(["Walla Walla", "Washington", "United States"])
print(fp2) # Walla Walla, Washington, United States

print(fp1 == fp2) # True

online_fp = FlexiblePlace.online("Walla Walla, Washington, United States")
print(online_fp.place_description) # 396089
print(fp1.place_description) # 

compare_places

This static method is used to calculate a score out of 100 that represents how likely two FlexiblePlace objects refer to the same location. Locations of differing specificity, but with otherwise agreeing information, are a 100% match.

from FlexiblePlace.src.FlexiblePlace import FlexiblePlace
compare_places = FlexiblePlace.compare_places

walla_walla = FlexiblePlace("Walla Walla, Washington, United States")
washington = FlexiblePlace("Washington, United States")
united_states = FlexiblePlace("United States")

print(compare_places(walla_walla, washington)) # 100.0

print(washington.compare(united_states)) # 100.0

combine_flexible_places

This static method is used to combine a list of FlexiblePlace objects to create a single FlexiblePlace object that represents the closest (and most specific) match of all the provided FlexiblePlace objects. The Python version of this method has the ability to lookup and add the FamilySearch "place description"

from FlexiblePlace.src.FlexiblePlace import FlexiblePlace
combine_flexible_places = FlexiblePlace.combine_flexible_places

walla_walla = FlexiblePlace("Walla Walla, Washington")
washington = FlexiblePlace("Washington, United States")
united_states = FlexiblePlace("United States")
dc = FlexiblePlace("Washington, D.C.")

combined_place = combine_flexible_places([walla_walla, washington, united_states, dc])
print(combined_place) # Walla Walla, Washington, United States

online_combined_place = combine_flexible_places_online([walla_walla, washington, united_states, dc])
print(online_combined_place.place_description) # 396089

Metadata

Release files for FlexiblePlace 1.0.4

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

Source distribution (sdist)

Source distribution for FlexiblePlace 1.0.4
File Size Uploaded Provenance Actions
flexibleplace-1.0.4.tar.gz 16.9 kB Without provenance Details for flexibleplace-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for FlexiblePlace 1.0.4
File Interpreter ABI Platform Actions
flexibleplace-1.0.4-py3-none-any.whl Python 3 none any Details for flexibleplace-1.0.4-py3-none-any.whl

Total release size: 37.1 kB

Release files / flexibleplace-1.0.4.tar.gz

Download URL flexibleplace-1.0.4.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9ce5de93fd6629d266c939d9843625a75876a77dee61baf99160413a764073de
BLAKE2b-256 checksum
How to use checksums
945e41674a3da3fb17562fa4bd3f1ca812182c2c27673d77bb480d7b49ec8e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / flexibleplace-1.0.4-py3-none-any.whl

Download URL flexibleplace-1.0.4-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f0b06338b0316cb0b53054d0bf05eb8e61d8facfd569459b4dc92afbc7ae409
BLAKE2b-256 checksum
How to use checksums
ae29b635bd5da976fe40a544ef9a7540ce3fbd6ea665638575901e93bc47053b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for FlexiblePlace 1.0.4

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