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

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.5
File Size Uploaded Provenance Actions
flexibleplace-1.0.5.tar.gz 17.1 kB Without provenance Details for flexibleplace-1.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 37.4 kB

Release files / flexibleplace-1.0.5.tar.gz

Download URL flexibleplace-1.0.5.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7e8a8bac4b72ac7097961680354f3dfcda5db0d317d49001539431ca0fc7564a
BLAKE2b-256 checksum
How to use checksums
d0379789cf3da0381ec4212e61353b0bddc5873fac7f298b826dbc0d12782236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

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

Security for FlexiblePlace 1.0.5

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