Here are the examples of the python api sqlalchemy.func.ST_DistanceSphere taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : zipcodes.py
with MIT License
from airq-dev
with MIT License
from airq-dev
def order_by_distance(self, zipcode: "Zipcode") -> "ZipcodeQuery":
return self.order_by(
func.ST_DistanceSphere(Zipcode.coordinates, zipcode.coordinates)
)
class Zipcode(db.Model): # type: ignore