bunq / tinker_python Goto Github PK
View Code? Open in Web Editor NEWInstall Tinker by just running this command: bash <(curl -s https://tinker.bunq.com/python/setup.sh)
License: MIT License
Install Tinker by just running this command: bash <(curl -s https://tinker.bunq.com/python/setup.sh)
License: MIT License
I cannot run any of the code examples, seems like the sdk was updated, but tinker was not.
❯ python create_production_configuration.py
Traceback (most recent call last):
File "/home/murr/Sandboxes/bunq-tinker/tinker/create_production_configuration.py", line 5, in <module>
from bunq.sdk.context import ApiContext
ImportError: cannot import name 'ApiContext' from 'bunq.sdk.context' (/home/murr/.local/share/virtualenvs/bunq-tinker-B0ODIK44/lib64/python3.11/site-packages/bunq/sdk/context/__init__.py)
~/.../bunq-tinker/tinker ( master U:2 ⊘ )
❯ python user_overview.py
Traceback (most recent call last):
File "/home/murr/Sandboxes/bunq-tinker/tinker/user_overview.py", line 2, in <module>
from libs.bunq_lib import BunqLib
File "/home/murr/Sandboxes/bunq-tinker/tinker/libs/bunq_lib.py", line 8, in <module>
from bunq.sdk.client import Pagination
ModuleNotFoundError: No module named 'bunq.sdk.client'
reference: bunq/tinker_php#11
Im not able to run user_overview.py I get this error message
File "tinker/user_overview.py“, line 2, in <module>
from libs.bunq_lib import BunqLib
File "/bunqtink/tinker/libs/bunq_lib.py", line 8, in <module>
from bunq.sdk.client import Pagination
File "/bunqtink/.venv/lib/python3.6/site-packages/bunq/__init__.py", line 6, in <module>
from bunq.sdk.json import converter
File "/bunqtink/.venv/lib/python3.6/site-packages/bunq/sdk/json/converter.py", line 1
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
Running bash <(curl -s https://tinker.bunq.com/python/setup.sh)
returned
Could not find "pipenv", try installing it by running "pip install pipenv".
even thoughpip list
does show pipenv
and pip install pipenv
says it is already installed.
The problem is that which pipenv
(which setup.py
runs to verify it being present) indeed returned nothing. I was able to fix this by installing it again through brew install pipenv
which does install itself in the user's path:
$ which pipenv
/usr/local/bin/pipenv
For off: I'm running Python 3.7 while the scripts clearly depend on 3.6. I know this is not supported.
But I'm running into issues. I've installed with the setup.sh
script. This seemed successful. But pipenvInstall
did not run due to my system having Python 3.7.
After updating the Pipfile to use Python 3.7 and running the pipenvInstall
snippet I'm still not able to run the user_overview.py
script:
$ ./tinker/user_overview.py
/usr/bin/env: ‘.venv/bin/python -W ignore’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
When trying to invoke the script directly:
env .venv/bin/python tinker/user_overview.py
Traceback (most recent call last):
File "tinker/user_overview.py", line 2, in <module>
from libs.bunq_lib import BunqLib
File "/tmp/tinker/tinker/libs/bunq_lib.py", line 6, in <module>
from bunq.sdk.client import Pagination
ModuleNotFoundError: No module named 'bunq.sdk.client'
First, installed requirements using pip3. Then ran python3 ./tinker/create_production_configuration.py --api-key (API_KEY)
to create a production context.
Then tried running python3 ./tinker/user_overview.py
but it fails with following error. It seems the API now requires a user_id to be given up front in the constructor, instead of retrieving it from the created context.
Traceback (most recent call last):
File "./tinker/user_overview.py", line 46, in <module>
main()
File "./tinker/user_overview.py", line 13, in main
bunq = BunqLib(environment_type)
File "/Users/l.dwaalmalefijt/Downloads/tinker_python-develop/tinker/libs/bunq_lib.py", line 54, in __init__
self.setup_current_user()
File "/Users/l.dwaalmalefijt/Downloads/tinker_python-develop/tinker/libs/bunq_lib.py", line 94, in setup_current_user
user = endpoint.User.get().value.get_referenced_object()
TypeError: get() missing 1 required positional argument: 'user_id'
The sandbox-user
user endpoint is being deprecated and will be replaced by sandbox-user-person
and sandbox-user-company
.
Installed PyEnv to have python 3.6.4
Ran the script from bunq.com/dev
entered the virtualenv with pipenv shell
Tried to run: tinker/user_overview.py
Got the error:
/usr/bin/env: ‘.venv/bin/python -W ignore’: No such file or directory
In the bunq Telegram group another user had the same issue, we have no idea what is wrong
$ tinker/user_overview.py --production
bash: tinker/user_overview.py: .venv/bin/python: bad interpreter: No such file or directory
why i can't run tinker/user_overview.py --production ? why is missing the .venv directory?
i have executed './go-pro' beforehand
Without any indication of a license in the code, we can't really use it, can we?
Currently users start without money, to change this a request will be sent to a predetermined user and will be accepted automatically.
Trying to get the tinker scripts to work in Python 3.8. In setup.sh I changed it to include the interpreter: PIPENV_VENV_IN_PROJECT=1 pipenv --python /usr/bin/python3 install
The installation seems to succeed. However running the tinker scripts fail:
./tinker/update_account.py
Traceback (most recent call last):
File "./tinker/update_account.py", line 2, in <module>
from libs.bunq_lib import BunqLib
File "/home/dave2/b2/tinker/libs/bunq_lib.py", line 8, in <module>
from bunq.sdk.client import Pagination
ModuleNotFoundError: No module named 'bunq.sdk.client'
reference: bunq/tinker_php#7
Environment: Ubuntu 18.04, dependencies up-to-date.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.