Yes, it’s a python module but it has bindings to rust for python 3.8-3.12. You should not need to compile it unless you are on an os that it’s not built for, but if you are, just having rust installed is fine, it would build in the background. No need for the repo installed or anything like that.
Let me know the OS . python version and if there are any issues after you have rust installed.
Oh on looking it could be the binding failed there @riddim I may need to republish, it was a bit of. nightmare to set up, but it won’t be much of a fix if so. Can you try safenode as well for me (just as a test)
for info I just did this
from autonomi_client import Client, Wallet, PaymentOption # All OK
initial_peers = [
"/ip4/142.93.37.4/udp/40184/quic-v1/p2p/12D3KooWPC8q7QGZsmuTtCYxZ2s3FPXPZcS8LVKkayXkVFkqDEQB",
"/ip4/157.245.40.2/udp/33698/quic-v1/p2p/12D3KooWNyNNTGfwGf6fYyvrk4zp5EHxPhNDVNB25ZzEt2NXbCq2",
"/ip4/157.245.40.2/udp/33991/quic-v1/p2p/12D3KooWHPyZVAHqp2ebzKyxxsYzJYS7sNysfcLg2s1JLtbo6vhC"
]
client = Client.connect(initial_peers)
no didn’t so far I’m on poetry but switching between the python versions (not dependencies) for now is a bit a pain for me … venv sometimes does funny stuff and I don’t understand why … maybe worth a shot to resolve that issue (if the dependency lock is as good as with poetry … will have a look)
that seems to work like expected no errors (I just ran the test case you linked … obviously test paths/keys/etc but no errors related to the package itself I think)
the self encryption does look good too
just feeling a bit strange in python to work with objects that come with that few functions and don’t expose internal variables
… I’m more used to a multitude of functions and variables where I can dig into the objects and have to search for the function I wanted to use xD …
Thanks @riddim I will do another publish of the client today and that should sort that out. There must be an issue in the workflow, but easy fix (just takes some prodding). But I will get another one done today anyway.
There you go @riddim Let me know how that goes for you. autonomi-client · PyPI The node will also update but it’s only a version number there and hopefully both now don’t require the build step you seen, but let’s see (GitHub release nightmares :D)
how do I make it look at Sepolia and not arbitrum one?
I can probably just set the env variable … but not sure that’s how it’s supposed to be …
but it’s not blowing up into my face on import anymore - guess you found the issue and resolved it
getting gas balance from arbitrum one as well - so something is working; just not interacting with the right chain yet for me
hmhmmm - it works with the right key … but I’m getting the wrong balance (well … the right balance on the arbitrum one network…) … and even when setting the EVM_NETWORK environment variable I’m not getting the right result :-/ …
I’m using peers from the peer-list we use to start nodes
and i tested the code in a regular *.py file too not just a Jupyter notebook; it’s not connected to the kernel of a Jupyter notebook stops until the next command flies in
from autonomi_client import Client, Wallet, PaymentOption
# Connect to network
client = Client.connect(["/ip4/167.71.140.72/udp/37462/quic-v1/p2p/12D3KooWMrQ95QFLzKkyTc2X3aEFqGhH5cPmsf1QkCuAD4PWNqyW",
"/ip4/206.189.16.118/udp/35160/quic-v1/p2p/12D3KooWSRowtypftsvPgEzDYvCk3aFgXuTvrLWz5CuLCyuRGXvF",
"/ip4/167.172.56.106/udp/60814/quic-v1/p2p/12D3KooWPbfY8FpzVYRVy6zCSKVPNG59iq4Ec8JkPpEfzkHDFFMB",
"/ip4/142.93.38.156/udp/60630/quic-v1/p2p/12D3KooWK4knM4w2wL5mdQHuLP8UPiXSKE8ag9mN1d7pyHTMBdME",
"/ip4/142.93.43.103/udp/43996/quic-v1/p2p/12D3KooWAC92dCnzkssVVNgKaCTBWo6hdemvjk3bY17XM2FvMPZC",
"/ip4/142.93.37.4/udp/58709/quic-v1/p2p/12D3KooWPN5fDaCnvTkDbh8HwUESP89RYGWif1R5g4w4VYQguhK2",
"/ip4/157.245.40.2/udp/33698/quic-v1/p2p/12D3KooWNyNNTGfwGf6fYyvrk4zp5EHxPhNDVNB25ZzEt2NXbCq2",
"/ip4/46.101.81.174/udp/59677/quic-v1/p2p/12D3KooWPmYKmwscF3oaaH9QpyLEJWRXWtD2c6MAnHt5GajVpLeE",
"/ip4/206.189.118.154/udp/56975/quic-v1/p2p/12D3KooWDFhb59KopBMko3TPUvG3PCEC151Xa9udwdMkGa49K153",
"/ip4/138.68.156.139/udp/52399/quic-v1/p2p/12D3KooWP2LgVw5ttgyx6VxUjgB3yJx3k8BFXwPdEhFWz3KaxhhP",
"/ip4/138.68.142.88/udp/40172/quic-v1/p2p/12D3KooWQ2BrH8eGcNYuzJ2kGQL7puCPMNZLkUC7Mjy9cHY4gKCa"])
# Download data
retrieved = client.data_get("e731c67a6be8c6abc052ed17338f540ab650e969d5a86571c1cb9821738a7956")
print(retrieved)
Cool, that’s also on the list Can you confirm that data does exist, even so though, there’s a bug in the message channel there.
Can I ask a favour @riddim ? Can you post the commands you use as text so I can copy and paste them easily? Ok so far, just in future. Actually errors to as I can ask cursor to help identify the issues
autonomi client built with git version: stable / 19921e0 / 2024-11-06
🔗 Connected to the Network Fetching file: "BegBlag.mp3"...
Successfully downloaded data at: e731c67a6be8c6abc052ed17338f540ab650e969d5a86571c1cb9821738a7956
Ah, in our api we have EvmNetwork::ArbitrumOne, // TODO: Make this configurable which is coming from rust. So we will get that an update the python bindings
Ah it seems there is a bit of an issue. It’s an API issue as the current mechanism is to pass env vars at compile time. So this means binary distributions of our code or in bindings like this will be stuck at whatever the vars are set at which is a bit of a bad thing. We will get this sorted though.
This is already great news as it gets the API sorted out and sorted in a sensible way for devs. I know many have wanted this and hopefully this push now will get these niggles sorted out fast. They are not big code things, just tidy up things and we cna get that done quickly I would hope.