space-track.org的python客户端

spacetrack的Python项目详细描述


PyPI VersionDocumentationTravisCoveragePython VersionMIT License

spacetrack是一个python模块,用于Space-Track

安装

$ pip install spacetrack

示例

>>>fromspacetrackimportSpaceTrackClient>>>st=SpaceTrackClient('identity','password')>>>print(st.tle_latest(norad_cat_id=[25544,41335],ordinal=1,format='tle'))125544U98067A16179.00000000.0000000000000-000000-00000022554400.00000.0000000000000.0000000.000000.000000000000141335U16011A16179.00000000.0000000000000-000000-00000024133500.00000.0000000000000.0000000.000000.000000000000>>># Operators, to save manual string formatting.>>>importspacetrack.operatorsasop>>>drange=op.inclusive_range(dt.datetime(2016,6,26),...dt.datetime(2016,6,27))>>># Streaming downloads line by line>>>lines=st.tle(iter_lines=True,publish_epoch=drange,orderby='TLE_LINE1',format='tle')>>>withopen('tle.txt','w')asfp:...forlineinlines:...fp.write(line)# Streaming downloads in chunk (note file is opened in binary mode)>>>content=st.download(iter_content=True,file_id=...,format='stream')>>>withopen('file.txt','wb')asfp:...forchunkincontent:...fp.write(chunk)>>># Parameter checking, using Space-Track's modeldef API>>>st.tle_latest(onrad_cat_id=25544)TypeError:'tle_latest'gotanunexpectedargument'onrad_cat_id'>>># Automatic rate limiting>>>forsatnoinmy_satnos:...# Gets limited to <20 requests per minute automatically by blocking...st.tle(...)

作者

文档

有关详细信息,visit the documentation

开发

太空轨道使用semantic versioning

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

推荐PyPI第三方库


热门话题
java Jetty:以编程方式停止会导致“1个线程无法停止”   java将位图对象转换为有问题的base64字符串   java Hibernate JPA映射具有一个值为列表的映射   java I无法将数据写入多个客户端小程序   mysql Java更新查询并非每次都有效   java佯装客户端和来自属性的名称   java DatainputStream的readUTF()方法单独读取文本数据,将报告EOF异常。为什么?   Java Date getTime函数返回负值   java为什么我的var返回不兼容问题出现错误13?   使用反射将List<SomeObject>作为参数的java How get方法   java处理与改型不一致的API响应   从BuffereImage渲染精灵时出现java问题   添加删除端点时,由于Spring MVC中的MIME类型,java资源被阻止   java在变量声明中使用double vs double   java itext和dotmatrix打印机   java如何在google cloud storage builder中设置项目ID?   ResourceConfig中的java依赖解析程序   java从NetBeans启动ImageJ插件会抛出一个JNI错误。仅从ImageJ启动它就可以了