pawamoy / aria2p

Command-line tool and library to interact with an aria2c daemon process with JSON-RPC.
https://pawamoy.github.io/aria2p
ISC License
479 stars 93 forks source link

Feature/aria2 daemon #110

Closed turicas closed 8 months ago

turicas commented 2 years ago

Hi! First of all, thanks for creating this project.

I need to run aria2c as a daemon and aria2p in the same Python script so it's self-contained. I was doing this by using subprocess and I had the idea to implement it inside aria2p as a context manager so other users will benefit also.

Note: I couldn't run all the commands listed on CONTRIBUTING.md (some of the commands were very slow to run), so if there's something missing, please describe it so I can fix.

pawamoy commented 2 years ago

Thanks, that's nice :slightly_smiling_face: I'll have to think about it seriously, to make sure the feature is useful in most case and easy to maintain.

pawamoy commented 8 months ago

OK so, in the end I'm going to close this for the following reasons:

  1. it's easy enough to run subprocess.Popen(["aria2c"])
  2. it's easy enough to write the config in the temporary/permanent file and pass it to the aria2c command
  3. accepting little configuration (secret, port) and hard-coding the rest will results in more requests
  4. a more complete solution would be to pass a config file path -> back to point 1 and 2
  5. less maintenance for me :slightly_smiling_face:
  6. no updates from original contributor