Giter Club home page Giter Club logo

v20-python's Introduction

v20-python's People

Contributors

herbsears-oanda avatar oanda-api avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v20-python's Issues

Streaming pricing performance

I would strongly suggest changing chunk_size from 1 byte to a typical size of a Price packet. This will introduce a very little delay in packet processing but at the same time it will significantly decrease CPU usage.

The line that needs to be changed is init.py#L186

Subscribe to all instruments and you'll see how hard is the performance hit with iter_lines(1)

Verbose "-v" flag in v20-trade-get does not work

Steps to reproduce:

  1. Open a position, for example:
    v20-order-market --tp 1.07257 --sl 1.07057 EUR/USD 1000
  2. List trades:
    v20-trade-get --all

Trade 50: 1000.0 (1000.0) of EUR_USD @ 1.07166

  1. List with "-v" flag:
    v20-trade-get -v --all

Traceback (most recent call last):

  File "[...]/v20-python-samples-master/env/bin/v20-trade-get", line 11, in <module>
    load_entry_point('v20-python-samples', 'console_scripts', 'v20-trade-get')()
  File "[...]//v20-python-samples-master/src/trade/get.py", line 73, in main
    print(trade.yaml(True))
AttributeError: 'Trade' object has no attribute 'yaml'

The code seems to call a non-existent trade.yaml.
In a differente file instead (view.py, same directory) the same result seems to be obtained in a different way:

    common.view.print_collection(
        "{} Trades".format(len(trades)),
        trades,
        [
            ("ID", lambda t: t.id),
            ("State", lambda t: t.state),
            ("Summary", lambda t: t.summary()),
            ("Unrealized P/L", lambda t: t.unrealizedPL),
            ("P/L", lambda t: t.realizedPL)
        ]
    )

Thank you

How do I replace an Order (Python)

I must say, I am not the best programmer. Can anyone help?
I want to replace the stoploss of Order 3204
data = {
"order": {
"units": "-1",
"instrument": "EUR_USD",
"price": "1.25000",
"type": "LIMIT"
}
}
api_order_limit_get_response = api.order.limit_replace(
accountID = "xxxxxxxx",
orderID = "3204",
data = data
)
print (api_order_limit_get_response.body['errorMessage'])

Native data types

Native data types seems to be broken in 3.0.12. It is returning str instead of float.

Sample code:

            for msg_type, msg in response.parts():
                if msg.type == 'PRICE':
                    print('Bid {}\tAsk {}'.format(
                        type(msg.bids[0].price),
                        type(msg.asks[0].price),
                    ))

Returns:

Bid <class 'str'>	Ask <class 'str'>
Bid <class 'str'>	Ask <class 'str'>

Used to return float in 3.0.11

position.close(): status 400 > "invalid JSON body, must be an object"

Latest v20 release gices me: "Invalid JSON body, must be an object" as the error message on a 400 response to using the position.close command.

my code looks like this:
req = api.position.close('account_id', 'EUR_USD')

Auth and everything else works (same API context can place orders, list orders, get account info.. etc..)

It appears to only work if I include the longUnits or shortUnits variables... but the documentation and method both suggest this should not be needed.

v20.Context

I would like to suggest making the following changes to Context constructor:

  1. setting default ssl value to True (now it's False)
  2. setting default port value to 443
  3. adding token parameter as an alternative to Context.set_token()
  4. decreasing poll_timeout value to 2. Now it's 10 seconds which doesn't make any sense.

Can not get account list from api-fxtrade.oanda.com

Has there been a change to the api-fxtrade.oanda.com/v3/accounts endpoint?

My code has stopped working on live but still works on demo. I'm using version 3.0.13 (have tried 12 and 11 with same result).

The command:

curl -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN>" "https://api-fxtrade.oanda.com/v3/accounts"

returns the correct result but the simple test.py below(with the same token and run from the same machine):

#!/usr/bin/env python

import v20 as oanda

api = oanda.Context('api-fxtrade.oanda.com', 443, True)
api.set_token('<TOKEN>')
res = api.account.list()
print res

fails with:

Traceback (most recent call last):
  File "./test.py", line 7, in <module>
    res = api.account.list()
  File "env/lib/python2.7/site-packages/v20/account.py", line 882, in list
    response = self.ctx.request(request)
  File "env/lib/python2.7/site-packages/v20/__init__.py", line 303, in request
    raise V20ConnectionError(url)
v20.errors.V20ConnectionError: Connection to v20 REST server at https://api-fxtrade.oanda.com:443/v3/accounts failed

and yet works fine against the demo site(with a demo token):

Method = GET
Path = https://api-fxpractice.oanda.com:443/v3/accounts
Status = 200
Reason = OK
Content-Type = application/json; charset=UTF-8

I've also regenerated the token for the live account several times with the same result.

Any help appreciated.

Support Python `Decimal`

The v20.Context class accepts a constructor parameter decimal_number_as_float=True

This flag is used in the Context.convert_decimal_number method, used by everything else to parse rational numbers returned in the API responses. By default it converts these all from strings to the native float type allowing arithmetic etc..

However, I would like the Python Decimal class to be used as it can guarantee exact precision when performing arithmetic.

One way to get around this is to sub-class the Context, e.g.

import v20
from decimal import Decimal

class DecimalContext(v20.Context):
    def convert_decimal_number(self, value):
        return Decimal(value)

References:

Exception when converting to UNIX time under Windows

The method Context.datetime_to_str uses strftime("%s.000000000") to convert the timestamp to the UNIX format, which doesn't work under Windows.
Use dt.timestamp() instead, which is portable across platforms.

Note: the timestamp function is only available in Python 3.3+.

v20.instrument.orderBook not implemented

http://developer.oanda.com/rest-live-v20/instrument-ep/ refers an orderBook action, but this is not available in v20

api = v20.Context(
    hostname=config["hostname"],
    port=config["port"],
    token=config["token"],
    datetime_format=config["datetime_format"]
)
params = {
    "time": "2018-09-28T12:00:00:00Z"
}
response = api.instrument.orderBook(instrument, **params)
orderBook = response.get("orderBook", 200)
print(orderBook)

I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-47-355910ca7359> in <module>()
      3     "time": "2018-09-28T12:00:00:00Z"
      4 }
----> 5 response = api.instrument.orderBook(instrument, **params)
      6 orderBook = response.get("orderBook", 200)
      7 print(orderBook)

AttributeError: 'EntitySpec' object has no attribute 'orderBook'

Is this a bug?

Egg packaging

You will bloat the repo should you keep adding egg files to it. Egg packaging has been superseded by Wheel packaging. See here.

It seems no document about the v20.functions

I cannot find the v20.functions documents beside cURL RESTful endpoints.But I preferred use v20.functions to trade.If I were wrong, please tell me.

I trial and error to summarize some:

import v20

#Place a market order:Market BUY EURUSD 10000 with stop loss 0.99332 and take profit 1.04718
ctx=v20.Context(
account_id, #just like 101-011-8XXXXX6-001
token='xxxxxxxxxxxxxxxxxxxxx', # get from Oanda website
)
response=ctx.order.market(
account_id,
instrument='EUR_USD',
units=10000,
type='MARKET',
side='BUY',
stopLossOnFill=v20.transaction.StopLossDetails(price=0.99332), # stop loss price
takeProfitOnFill=v20.transaction.TakeProfitDetails(price=1.04718). # take profit price
)
if response.status==201 and response.reason=='Created': # if success to place order
print(response.body['orderFillTransaction']) # check the response.body['orderFillTransaction']
print('id:',response.body['orderFillTransaction'].id) # print the order id

beside id, there's some information of order fulfillment.

print('instrument:',response.body['orderFillTransaction'].instrument)
print('type:',response.body['orderFillTransaction'].type)
print('price:',response.body['orderFillTransaction'].price)
print('orderID:',response.body['orderFillTransaction'].orderID)
print('batchID:',response.body['orderFillTransaction'].batchID)
print('requestID:',response.body['orderFillTransaction'].requestID)
print('units:',response.body['orderFillTransaction'].units)
print('requestedUnits:',response.body['orderFillTransaction'].requestedUnits)
print('commission:',response.body['orderFillTransaction'].commission)
print('accountBalance:',response.body['orderFillTransaction'].accountBalance)
print('time:',response.body['orderFillTransaction'].time)
print('reason:',response.body['orderFillTransaction'].reason)

Hope to know more who trade by Oanda v20 API.
And hope more details of documents about the v20.

Unhandled exceptions

I've got the following unhandled exception while streaming rates with your wrapper:

2016-11-18T22:31:01.419004000Z Traceback (most recent call last):
2016-11-18T22:31:01.419176000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 451, in _update_chunk_length
2016-11-18T22:31:01.484328000Z     self.chunk_left = int(line, 16)
2016-11-18T22:31:01.484500000Z ValueError: invalid literal for int() with base 16: b''
2016-11-18T22:31:01.484735000Z During handling of the above exception, another exception occurred:
2016-11-18T22:31:01.484943000Z Traceback (most recent call last):
2016-11-18T22:31:01.485080000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 232, in _error_catcher
2016-11-18T22:31:01.485200000Z     yield
2016-11-18T22:31:01.485305000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 502, in read_chunked
2016-11-18T22:31:01.485427000Z     self._update_chunk_length()
2016-11-18T22:31:01.485535000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 455, in _update_chunk_length
2016-11-18T22:31:01.486292000Z     raise httplib.IncompleteRead(line)
2016-11-18T22:31:01.486446000Z http.client.IncompleteRead: IncompleteRead(0 bytes read)
2016-11-18T22:31:01.486664000Z During handling of the above exception, another exception occurred:
2016-11-18T22:31:01.486874000Z Traceback (most recent call last):
2016-11-18T22:31:01.486979000Z   File "/usr/lib/python3.5/site-packages/requests/models.py", line 676, in generate
2016-11-18T22:31:01.640070000Z     for chunk in self.raw.stream(chunk_size, decode_content=True):
2016-11-18T22:31:01.640242000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 353, in stream
2016-11-18T22:31:01.640381000Z     for line in self.read_chunked(amt, decode_content=decode_content):
2016-11-18T22:31:01.640497000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 530, in read_chunked
2016-11-18T22:31:01.640613000Z     self._original_response.close()
2016-11-18T22:31:01.640730000Z   File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
2016-11-18T22:31:01.670915000Z     self.gen.throw(type, value, traceback)
2016-11-18T22:31:01.671048000Z   File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 250, in _error_catcher
2016-11-18T22:31:01.671173000Z     raise ProtocolError('Connection broken: %r' % e, e)
2016-11-18T22:31:01.671286000Z requests.packages.urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
2016-11-18T22:31:01.671535000Z During handling of the above exception, another exception occurred:
2016-11-18T22:31:01.671750000Z Traceback (most recent call last):
2016-11-18T22:31:01.671888000Z   File "/app/proxy.py", line 84, in <module>
2016-11-18T22:31:01.671996000Z     main()
2016-11-18T22:31:01.672104000Z   File "/app/proxy.py", line 65, in main
2016-11-18T22:31:01.672709000Z     for msg_type, msg in response.parts():
2016-11-18T22:31:01.672839000Z   File "/usr/lib/python3.5/site-packages/v20/response.py", line 52, in parts
2016-11-18T22:31:01.696608000Z     for line in self.lines:
2016-11-18T22:31:01.696744000Z   File "/usr/lib/python3.5/site-packages/requests/models.py", line 720, in iter_lines
2016-11-18T22:31:01.696857000Z     for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):
2016-11-18T22:31:01.696965000Z   File "/usr/lib/python3.5/site-packages/requests/models.py", line 679, in generate
2016-11-18T22:31:01.697071000Z     raise ChunkedEncodingError(e)
2016-11-18T22:31:01.697191000Z requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

Native data types

API server returns decimal values as str. Should be float. Same problem with the streaming pricing.

>>> response = ctx.pricing.get(account_id, instruments='EUR_USD')
>>> pprint(json.loads(response.raw_body))
{'prices': [{'asks': [{'liquidity': 10000000, 'price': '1.11095'}],
             'bids': [{'liquidity': 10000000, 'price': '1.11082'}],
             'closeoutAsk': '1.11099',
             'closeoutBid': '1.11077',
             'instrument': 'EUR_USD',
             'quoteHomeConversionFactors': {'negativeUnits': '0.80307094',
                                            'positiveUnits': '0.80291619'},
             'status': 'tradeable',
             'time': '1478199233.623775422',
             'unitsAvailable': {'default': {'long': '0', 'short': '0'},
                                'openOnly': {'long': '0', 'short': '0'},
                                'reduceFirst': {'long': '0', 'short': '0'},
                                'reduceOnly': {'long': '0', 'short': '0'}}}]}

Stream candle Data

How can I stream 1m/5m... candle data, instead of streaming bid and ask prices???

order.stop_loss_replace fails with status 400

In order.py -> EntitySpec -> replace method: the request url uses {orderSpecifier} but a few lines below an 'orderID' param is set.

request = Request(
'PUT',
'/v3/accounts/{accountID}/orders/{orderSpecifier}'
)

    request.set_path_param(
        'accountID',
        accountID
    )

    request.set_path_param(
        'orderID',
        orderID

)

When changed to 'orderSpecifier' it works as expected.

    # -------------------CHANGED THIS -----------------
    request.set_path_param(
        'orderSpecifier',  # used to be 'orderID'
        orderID
    )
    # -------------------------------------------------

Missing dependency (yaml)

PyYAML module missing in setup.py

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/v20/__init__.py", line 2, in <module>
    from v20 import account
  File "/usr/lib/python3.5/site-packages/v20/account.py", line 2, in <module>
    from v20.base_entity import BaseEntity
  File "/usr/lib/python3.5/site-packages/v20/base_entity.py", line 3, in <module>
    import yaml
ImportError: No module named 'yaml'

Sample Code

First of all, thank you for this helpful library. Nevertheless, it would be nice if there was some simple example using this.

Stall streaming connections

In your documentation you recommend that the client application should terminate the connection and re-connect its corresponding stream in the event of:

  • No data has been received (no ticks, no heartbeats) from the rates stream for more than 10 seconds.
  • No data has been received (no events, no heartbeats) from the events stream for more than 20 seconds.

None of these recommendations are implemented in v20 python wrapper. There's no way to set v20.Content timeout nor there is a way to catch stall connection.

Please fix this.

Make JSON decoder pluggable

You use built-in JSON decoder which is slow (except on PyPy)

Could you please make it pluggable/configurable so I that I could use faster decoder like ujson?

screenshot from 2016-11-08 19-48-46

Reserved words

How I'm supposed to set from parameter in instrument.candles()? It's a reserved word in Python

Limit Order Bad Request

I am getting Bad Request when I try using limit orders (I am able to make the same order using the market orders - without the price). Hence, I guess that the price is causing the problem. I am in fact using bid or ask prices of the asset for placing the limit order. Therefore, the price formatting should not be problem, I guess. I would welcome if somebody can help me on this.

Note: Also, when we calculate a price for the limit order, what is the best way to set precision etc of that calcualted price to make sure that we would not receive a bad request as response?

Instrument Accept-Datetime-Format Bug

No matter which date time format I choose I get back UNIX datetime. This doesn't seem to be an issue with this module but an underlying problem with the v20 api. I didn't know where else to report it. See examples using curl below:

curl -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -H "Accept-Datetime-Format: UNIX" "https://api-fxtrade.oanda.com/v3/instruments/USD_JPY/candles?count=1"

{"granularity":"S5","instrument":"USD_JPY","candles":[{"complete":false,"time":"1491201560.000000000","volume":8,"mid":{"o":"111.467","h":"111.469","l":"111.467","c":"111.469"}}]}

curl -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -H "Accept-Datetime-Format: RFC3339" "https://api-fxtrade.oanda.com/v3/instruments/USD_JPY/candles?count=1"

{"granularity":"S5","instrument":"USD_JPY","candles":[{"complete":false,"time":"1491201650.000000000","volume":1,"mid":{"o":"111.460","h":"111.460","l":"111.460","c":"111.460"}}]}

Accept-Datetime-Format bug

Accept-Datetime-Format is not respected in heartbeat messages:

This is what I get when Accept-Datetime-Format is set to UNIX

Pricing Heartbeat 2016-12-13T13:41:27.222512838Z
================================================

type = HEARTBEAT
time = 2016-12-13T13:41:27.222512838Z

Type = PRICE
instrument = EUR_NZD
time = 1481636487.426472413
status = tradeable
bids = [1]
asks = [1]
closeoutBid = 1.47247
closeoutAsk = 1.47301

Type = PRICE
instrument = EUR_HKD
time = 1481636487.296723637
status = tradeable
bids = [1]
asks = [1]
closeoutBid = 8.24445
closeoutAsk = 8.24594

Could you please also unify __str__() implementation for different entities? Currently it's not the same at least for PRICE and HEARTBEAT messages. I suppose Type in PRICE should be lowercase.

Floats and integers are returned as strings

I think it's a bit silly that numbers like floats and integers are returned as strings:

>>> import v20
>>> api = v20.Context(hostname='api-fxpractice.oanda.com', token='xxx', datetime_format='UNIX')
>>> api.pricing.get(accountID='101-xxxx', instruments='GBP_USD').get('prices')[0].dict()['bids'][0]['price']
'1.28662'
>>> api.pricing.get(accountID='101-xxxx', instruments='GBP_USD').get('prices')[0].dict()['time']
'1503089998.464826588'
>>>

Is there a reason for that?

Single API endpoint

Since you have load-balancers in front of app servers, wouldn't it make sense to have a single endpoint for everything instead of having api-fxtrade.oanda.com and stream-fxtrade.oanda.com?

wat to get history

v20-transaction-range 1 1045 | grep 'CLIENT_ORDER'
v20-transaction-range 1 1045 | grep 'TRADE_CLOSE'

AttributeError: 'Context' object has no attribute 'primitives'

Getting AttributeError in 3.0.11 Used to work fine with 3.0.9

>>> ctx = v20.Context('api-fxtrade.oanda.com', token=access_token)
>>> ctx.account.instruments(account_id)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    ctx.account.instruments(account_id)
  File "/usr/lib/python3.5/site-packages/v20/account.py", line 1128, in instruments
    for d in jbody.get('instruments')
  File "/usr/lib/python3.5/site-packages/v20/account.py", line 1128, in <listcomp>
    for d in jbody.get('instruments')
AttributeError: 'Context' object has no attribute 'primitives'

Inconsistencies in v20.instrument.Candlestick

  1. dict() returns prices as str, ordered_dict() returns prices as float
>>> candles[0]
<v20.instrument.Candlestick object at 0x7fb1d471d3c8>
>>>
>>> candles[0].dict()
{'time': '1020718800.000000000', 'bid': {'h': '0.9152', 'c': '0.9152', 'o': '0.9152', 'l': '0.9152'}, 'mid': {'h': '0.91535', 'c': '0.91535', 'o': '0.91535', 
'l': '0.91535'}, 'volume': 1, 'ask': {'h': '0.9155', 'c': '0.9155', 'o': '0.9155', 'l': '0.9155'}, 'complete': True}
>>>
>>> candles[0].ordered_dict(True)
OrderedDict([('time', '1020718800.000000000'), ('bid', OrderedDict([('o', 0.9152), ('h', 0.9152), ('l', 0.9152), ('c', 0.9152)])), ('ask', OrderedDict([('o', 
0.9155), ('h', 0.9155), ('l', 0.9155), ('c', 0.9155)])), ('mid', OrderedDict([('o', 0.91535), ('h', 0.91535), ('l', 0.91535), ('c', 0.91535)])), ('volume', 1)
, ('complete', True)])
  1. ordered_dict() has parameter verbose, dict() doesn't.

  2. Since you expose prices as float wouldn't it be good idea to expose time as datetime.datetime ?

>>> candles[0].bid.h
0.9152
>>> candles[0].time
'1020718800.000000000'

HTTP 502 error when trying to access order book on practice account

When I try to send a GET request to the following link I get a 502 (Bad Gateway) error:

https://api-fxpractice.oanda.com/v3/instruments/USD_JPY/orderBook

I've checked issue #29 and I don't think this is the same thing, as the original poster was able to circumvent their problem by sending a GET request to the following URL directly from command line using curl:

https://api-fxtrade.oanda.com/v3/instruments/USD_JPY/orderBook

The only difference between their link and mine is that theirs is fxtrade and mine is fxpractice, so that's why I'm wondering if that's the issue. I don't have an fxtrade account yet so I can't check. If this is true, is this an intentional policy on Oanda's part not to provide order book data to practice accounts?

There was also some mention of using OrderBook instead of orderBook, but I've found that all other combinations of case generate a 404 instead of a 502 error. The code I'm using is provided below - it was mostly just stripped straight out of the request() and __request() methods of the API class in the oandaV20.py file. If you uncomment the first line and comment out the second you should get a perfectly healthy HTTP 200 response, showing that the URL for candles is available for API interaction:

#endpoint = instruments.InstrumentsCandles(instrument="USD_JPY", params = {"alignmentTimezone": "UTC"}) 
endpoint = instruments.InstrumentsOrderBook(instrument="USD_JPY", params = {"alignmentTimezone": "UTC"})
access_token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

method = endpoint.method.lower()

c = requests.Session()
c.stream = False
c.headers['Authorization'] = 'Bearer ' + access_token
c.headers.update({"Accept-Encoding": "gzip, deflate"})

func = getattr(c, method)

request_args = {}
request_args['params'] = {"alignmentTimezone": "UTC"}
url = "{}/{}".format('https://api-fxpractice.oanda.com', endpoint)
print(url)
response = func(url, stream=False, headers={}, **request_args)
print(response)
content = response.content.decode('utf-8')
content = json.loads(content)

Poor documentation and example code

There is no real examples or documentation showing how to do some simple things, e.g.

  • Open a trade
  • Close a trade
  • Place stop loss order
  • etc

I know there is v20-python-samples but this is a very convoluted CLI written in python. Why would a developer want to reverse engineer a CLI tool in order to learn how to use this python package? It makes no sense.

Should I make a PR to add some readme files in a docs directory with some examples?

pip install v20 error

when i try to pip install v20. the error is shown as
c:\users\admiral\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot
open include file: 'io.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Buil
dTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe' failed with exi
t status 2

wonder how to solve it?

problems when import v20

Hi there
When I try to import v20, it saids like:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import v20
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/v20/init.py", line 2, in
import account
ImportError: No module named 'account'

Pls help me to figure it out. Ty

Syntax Warning

opt/anaconda3/lib/python3.9/site-packages/v20-3.0.25.0-py3.9.egg/v20/request.py:30: SyntaxWarning: "is" with a literal. Did you mean "=="?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.