casm.api.API¶
-
class
casm.api.API[source]¶ Class to provide access to the libccasm C API.
Acts like a singleton by loading libcasm and libccasm into a class member the first time (and only the first time) that a new API instance is constructed.
Each API instance uses the same shared class member to make calls.
Acts like a singleton by loading libcasm and libccasm into a class member the first time (and only the first time) that a new API instance is constructed.
Each API instance uses the same shared class member to make calls.
-
__init__()[source]¶ Acts like a singleton by loading libcasm and libccasm into a class member the first time (and only the first time) that a new API instance is constructed.
Each API instance uses the same shared class member to make calls.
Methods
__init__()Acts like a singleton by loading libcasm and libccasm into a class member the first time (and only the first time) that a new API instance is constructed.
capi(args, primclex, root, log, err_log)Make an API call
command_list()Get list of recognized casm commands implemented at the libcasm level
nullstream()Get a pointer to a CASM::Log that writes to null.
ostringstream_delete(ptr)Delete a CASM::OStringStreamLog
ostringstream_new()Construct a CASM::OStringStreamLog that writes to std::ostringstream.
ostringstream_to_str(ptr)Copy the value of a CASM::OStringStreamLog to a Python string.
primclex_delete(ptr)Delete a CASM::PrimClex
primclex_new(path, log, err_log)Construct a new CASM::PrimClex
primclex_null()Construct a CASM::PrimClex nullptr
primclex_refresh(ptr, log, err_log[, …])Call CASM::PrimClex::refresh to reload PrimClex data from settings files
stderr()Get a pointer to a CASM::Log that writes to std::cerr
stdout()Get a pointer to a CASM::Log that writes to std::cout.
-