货币流通

cloudmersive-currency-api-client的Python项目详细描述


cloudmersive_currency_api_客户端

货币api帮助您轻松检索汇率和在货币之间转换价格。在

这个Python包为Cloudmersive Currency API提供了一个本机API客户机

  • API版本:v1
  • 软件包版本:3.0.1
  • 生成包:io.swagger.codegen.语言.PythonClientCodegen在

要求

Python 2.7和3.4+

安装和使用

pip安装

如果python包托管在Github上,则可以直接从Github安装

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(您可能需要使用根权限运行pipsudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

然后导入包:

^{pr2}$

设置工具

通过Setuptools安装。在

python setup.py install --user

(或sudo python setup.py install为所有用户安装软件包)

然后导入包:

importcloudmersive_currency_api_client

入门

请按照installation procedure操作,然后运行以下命令:

from__future__importprint_functionimporttimeimportcloudmersive_currency_api_clientfromcloudmersive_currency_api_client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: Apikeyconfiguration=cloudmersive_currency_api_client.Configuration()configuration.api_key['Apikey']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance=cloudmersive_currency_api_client.CurrencyExchangeApi(cloudmersive_currency_api_client.ApiClient(configuration))source='source_example'# str | Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.destination='destination_example'# str | Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.source_price=1.2# float | Input price, such as 19.99 in source currencytry:# Converts a price from the source currency into the destination currencyapi_response=api_instance.currency_exchange_convert_currency(source,destination,source_price)pprint(api_response)exceptApiExceptionase:print("Exception when calling CurrencyExchangeApi->currency_exchange_convert_currency: %s\n"%e)

API终结点文档

所有uri都是相对于https://api.cloudmersive.com

ClassMethodHTTP requestDescription
CurrencyExchangeApicurrency_exchange_convert_currencyPOST /currency/exchange-rates/convert/{source}/to/{destination}Converts a price from the source currency into the destination currency
CurrencyExchangeApicurrency_exchange_get_available_currenciesPOST /currency/exchange-rates/list-availableGet a list of available currencies and corresponding countries
CurrencyExchangeApicurrency_exchange_get_exchange_ratePOST /currency/exchange-rates/get/{source}/to/{destination}Gets the exchange rate from the source currency into the destination currency

模型文档

授权文件

阿皮基

  • Type:API密钥
  • API key参数名:Apikey
  • Location:HTTP头

作者

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

推荐PyPI第三方库


热门话题
java启动时加载值示例代码(xml)   java什么是视图索引?当视图组将视图添加到索引1时会发生什么   java如何调用HttpUrlConnection disconnect()   java将日期转换为毫秒,givse错误结果   java正在处理“.”上的IP地址拆分字符串性格   java proguard不创建输出jar   编译中的Java默认修饰符   java中的管道I/O流   java为集合返回的最佳迭代器类型?拆分器,流?   java如何修改JTextArea中tab键的行为?   来自Android Studio HTML文档的外部应用程序中的java Open Local PDF   组件和轻量级/重量级之间的java差异   java在有向图中查找模式   python可以创建运行服务器端程序的Java Web Start应用程序吗?   NiFi中基于内容的java更新属性