访问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第三方库


热门话题
java为什么参数。getType()。isInstance(HttpServletRequest.class)返回值为false,但use“==”为true   使用Java的文本文件中的简单列表   linux Java创建具有特定所有者(用户/组)的文件和目录   java我试图解析一个文本文件,以计数唯一字符串的数量,并打印一些关于这些字符串的信息   雅加达ee如何使用JavaEE6@Resource注释   java从数据库中获取所有值,并将其存储在字符串数组中   java需要ArrayList中的单个数组   java变量id可能未使用lombok初始化Spring引导控制器   JavaS3客户端。读取超过文件大小时的GetObject行为   java在另一个活动列表视图中显示JSONObject   java spring引导fat jar注册到带有奇怪端口的eureka   java如何与mongoDB建立Android Studio连接?   java LinkedIn OAuth2/oauth/v2/accessToken响应未返回“令牌类型”   java如何在jtree中只列出非隐藏和非系统文件   Mybatis批量将Java BigDecimal插入SQL Server decimal(18,2)无法正常工作   java Hibernate Criteria Builder:如何按可为空的实体属性进行筛选?   如果涉及方法内变量的范围,python与java是否不同?   java如何实现web服务客户端,该客户端通过基于NTLM身份验证的身份验证连接到外部web服务   java使Jackson在反序列化期间无法将double转换为int