Created
August 12, 2021 22:25
-
-
Save tore-statsig/55998d42dc8ae4b1d8a0b945ecbf20d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
lib = cdll.LoadLibrary("./statsigshared.so") | |
class GoString(Structure): | |
_fields_ = [("p", c_char_p), ("n", c_longlong)] | |
lib.Initialize.argtypes = [GoString] | |
key = GoString(b"secret-XXXXXXXXXXXXXXXXXXXXXXXXXXX", 34) | |
lib.CheckGate.argtypes = [GoString, GoString] | |
uid = GoString(b"user", 4) | |
gate = GoString(b"test", 4) | |
lib.Initialize(key) | |
print(lib.CheckGate(uid, gate)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment