访问trulia.com的rest api的python库

trulia的Python项目详细描述


#特鲁利亚

访问trulia的rest api的python库

##安装

pip install trulia

##用法

import trulia.stats import trulia.location

TRULIA_KEY = “RELACE_WITH_YOUR_API_KEY”

# Get all cities in California cities = trulia.location.LocationInfo(TRULIA_KEY).get_cities_in_state(“CA”)

# Get all counties in California counties = trulia.location.LocationInfo(TRULIA_KEY).get_counties_in_state(“CA”)

# Get all neighborhoods in Los Angeles neighborhoods = trulia.location.LocationInfo(TRULIA_KEY).get_neighborhoods_in_city(“Los Angeles”, “CA”)

# Get all states in the United States states = trulia.location.LocationInfo(TRULIA_KEY).get_states()

# Get all zip codes in California zip_codes = trulia.location.LocationInfo(TRULIA_KEY).get_zip_codes_in_state(“CA”)

# Get all traffic and listing stats for the city of Los Angeles in January 2014 city_stats = trulia.stats.TruliaStats(TRULIA_KEY).get_city_stats(city=”Los Angeles”, state=”CA”, start_date=”2014-01-01”, end_date=”2014-01-31”)

# Get all traffic and listing stats for Santa Clara county in January 2014 county_stats = trulia.stats.TruliaStats(TRULIA_KEY).get_county_stats(city=”Santa Clara”, state=”CA”, start_date=”2014-01-01”, end_date=”2014-01-31”)

# Get all traffic and listing stats for Venice, CA neighborhood in January 2014 neighborhood_stats = trulia.stats.TruliaStats(TRULIA_KEY).get_neighborhood_stats(neighborhood_id=7183, start_date=”2014-01-01”, end_date=”2014-01-31”)

# Get all traffic and listing stats for California in January 2014 state_stats = trulia.stats.TruliaStats(TRULIA_KEY).get_state_stats(state=”CA”, start_date=”2014-01-01”, end_date=”2014-01-31”)

# Get all traffic and listing stats for the 90025 zip code in January 2014 zip_code_stats = trulia.stats.TruliaStats(TRULIA_KEY).get_zip_code_stats(zip_code=”90025”, start_date=”2014-01-01”, end_date=”2014-01-31”)

##文档

trulia的api文档可以在这里找到:http://developer.trulia.com/docs

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Hibernate:jpamodelgen生成java而不是类   java如何在第二次活动结束后显示广告?   javascript如何在linux或windows上将java导出到jar   java One ArrayList添加了2个不同的选项   AmazonWeb服务如何在java中使用AWS Textract检索pdf中存在的表   java为什么RecycleView中的水平项在单击时不起作用?   java计算如果存在映射   java在捕获的组上应用正则表达式   如何使用Java在MySQL的同一个表中插入来自不同类的值   java字符串中最常见的字母(大写和小写)   Spring SessionBean实例正在由java中的多个用户共享   使用Spring Boot将@WebInitParam中的值外部化   java一创建线程就开始执行(多线程)   java是安卓所需的系统权限。意图行动给你打电话?