Python modules for node, client and self-encryption

Hi folks, @riddim I am gonna yank the autonomi-client package for now ( I will leave the vault (safenode) and self_encryption). The API does not make sense currently and the connect function is redundant. In the rust layer it disconnects after 10sec without warning. so there is a bit of rust API refactor required here.

It’s all small stuff, but needs this focus to move things around and to make sense. As well as of course fixing those register type API @happybeing :wink: We will get there.

I really hope we can get this all in a week, but I am optimistic and it drive the guys to insanity :smiley: :smiley: We will see though

19 Likes

Recently found out pypi keeps download stats and some people like pypistats.org convert it to a dashboard.

Might be of interest to people publishing packages.

4 Likes

Nice, I am hopeful we will get a new version and the client up soon. There have been a few self_encryption updates (I added a lot of docs and functor based decryption etc.) PyPI Download Stats

8 Likes

Just dropping zeromq as local communication channel between a process connected to the network and keeping that connection open and other api functions that interact with it.

I know you’re well aware of the technology @dirvine but I think you focused on it in terms of node communication via tcp sockets… For inter-thread/process communication it’s very well suited for local comms too (and e.g. Is used by Jupyter notebooks to interact with the python kernel)
… Using a icp:// type socket would be os independent and easy+super fast for local comms (and couldn’t cause trouble because of ports being already used or so…)
Crappycrap - no Windows Support for icp sockets … Stupid me… So maybe different protocol (on windows…?)

1 Like

WoHOOOW

easy to operate the python lib! I need dig deeper when I get a chance!

12 Likes

and for stuff uploaded with the terminal you need to use the dir_download_public :slight_smile:

5 Likes

I was able to download!

However, I wasn’t able to upload using the build_apps_with_python.md document (changing init_local() to init() per your advice).

I do notice, the balance shown is my sepolia balance, not my one balance.

2 Likes

ah! sorry - 2nd change!

network = Network(False)

that makes sure it uses the real deal and no test network … sorry forgot about that other change I made …

1 Like

Unfortunately, I’m still getting the same error and sepolia balance.

I will note, I’m unable to upload from this (vps) node with the latest cli as well. I don’t think they are related, but just in case.

hmhmmm … the sepolia balance smells fishy ofc …

I figured it out. I still had EVM_NETWORK set to sepolia.

ca7ac61ce74e27b64bd749617657a946258fd5d97bca48133b089b112fed59c9

But this is a different kind of data from a chunk? Because ant file download doesn’t work. I guess I have a lot more reading to do. lol

Thank you!

3 Likes

I think (!) the cli only operates on file level (where e.g. The name of the file is store on the network too) while you just uploaded the content or a file as self encrypted chunks.

I think there were file operations too in the python lib - I for sure downloaded files… Probably you can upload a file ‘as file’ too and that should be retrievable via cli as well then

CLI uses archives, which are a container of other files, much like a directory/folder.

The CLI always wraps files in an archive, even if there is just one.

The network itself doesn’t require archives though. You can upload single files just fine, and AntTP will host them fine too, but CLI will not.

There was some discussion about this in a parallel topic.

3 Likes

I couldn’t find any reference to file/archive upload in the API docs, but I did test and confirm that the file address we get from the uploads (vs the archive address) does work for retrieving data directly.

So that’s part of the way there, but I don’t yet see a way to go from archive address to file contents, which means I only get the encrypted file address during the upload. And I can’t yet go from data blob uploaded with api/file address to something downloadable via ant.

ant cli only seems to store the archive address and filename in the vault.

progress, baby steps. lol

4 Likes

I guess we’ll get some proper docs and possibly improved api soonish :slight_smile:

2 Likes

IDK if it is exposed to Python but PublicArchive::map() contains the paths and metadata, including XorName for each file.

You might find it helpful to look at docs.rs, search Autonomi.

What is a .whl file? And how are we supposed to use it?

https://pypi.org/project/autonomi-client/#files

it’s basically “the” python package in different versions

you just install the autonomi-client via pypi and everything will be alright - no need to do anything with wheel files by hand

1 Like

Hi folks, I’m following the Autonomi documentation to connect to a local testnet using Python. However, on Jupyter, when I run:

client = await Client.init_local()

I get this error:

ConnectionError: Failed to connect: Failed to populate our routing table with enough peers in time

For context:

  • I created the local testnet as described in the docs.
  • EVM is running in the background via cargo run --bin evm-testnet
  • Testnet is also running via cargo run --bin antctl -- local run --build --rewards-address=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
  • I started Testnet after EVM was up and running

Is there anything obvious I might be missing or any additional configuration needed?


EDIT: I’m running everything on a devcontainer inside vscode, if it matters

1 Like

I’d edit that post to obscure that wallet address

We don’t need to know you are a whale who prefers plaid :slight_smile:

Sorry I cant help much with your peers problem, though I know that is getting work done on it presently.

1 Like