Using ManagerAccessMixin to access the Ape CLI Chain Manager #1351
LinuxIsCool
started this conversation in
General
Replies: 1 comment
-
In general, I'm curious about more documentation and use case examples of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering how to access ape features like the chain manager in scripts. I noticed that @banteg uses the ManagerAccessMixin to accomplish this in Llamapay.
This pattern seems very powerful for generally accessing the power of Ape from Python code. Am I right about this? Is this feature documented? Is this pattern canon or a hack? Do people know of other instances of doing this?
For reference, see the usage here:
Import:
https://github.com/banteg/ape-llamapay/blob/ea09447f599e1cf5e8f88d10cd0e5ce59931015a/llamapay/llamapay.py#L8
Mixin:
https://github.com/banteg/ape-llamapay/blob/ea09447f599e1cf5e8f88d10cd0e5ce59931015a/llamapay/llamapay.py#L95
Chain Manager:
https://github.com/banteg/ape-llamapay/blob/ea09447f599e1cf5e8f88d10cd0e5ce59931015a/llamapay/llamapay.py#L127
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions