Package: f5py
f5pyIs a Python library written in Rust for the F5 BIG-IP Configurations parsing.The idea is to provide a simple and easy to use library to parse, manipulate, construct and generate F5 BIG-IP configurations in multiple output formatsStarting with JSON for facilitating the automation of F5 python scripts written by network and security engineers.Then the plan is to support generating to the following formats* LTM commands
* F5 REST API
* F5 AS3Although this library is not a replacement for the F5 SDK, it is a good starting point for those who want to automate F5 BIG-IP LTM configurations in a simpler wayActual StateF5 TMM Configurations generated within the scf files (LTM Commands) are parsed to generate the native rust objects that represent the configurations.
The configugurations can be parsed from supported formats as well
Objects manipulation and JSON Output/Parsing are already supported* to_json()
* to_yaml()
* to_toml()
* to_csv() <<-- Default implementation, works only on simple structs

* from_json()
* from_yaml()
* from_toml()Roadmap* CSV output, having Virtual Servers as a reference. 
* Generating LTM commands
* Parsing and generating F5 iControl REST API
* Parsing and generating F5 AS3Useful Links* Github Issues Repository: `https://github.com/AhmedThabet/f5py-doc`

* The same library is used in this WASM frontend, so it's possible to parse the configs without writing a simple line of code!
    `https://ipvx.me/f5`UsageAll the objects can be initialize by passing the raw config text to the class's initializer
or using the new_default() function which will create a new object with default valuesfromf5pyimport*l=LTM("""ltm pool /Common/www.ipvx.me {members {/Common/10.1.2.3:8888 {address 10.1.2.3}}monitor /Common/TCP-8888}ltm virtual /Common/www.ipvx.me {destination /Common/35.156.107.63:443ip-protocol tcpmask 255.255.255.255pool /Common/www.ipvx.meprofiles {/Common/clientssl {context clientside}/Common/serverssl {context serverside}/Common/http { }/Common/tcp { }}source 0.0.0.0/0source-address-translation {type automap}translate-address enabledtranslate-port enabled}""")lLTMat0x7fff57e086b0,partitions:1,virtual_servers:1,pools:1,snat_pv=l.virtual_servers[0]vVS:0x7fff57e086c8,name:/Common/www.ipvx.me,destination:/Common/35.156.107v.to_json()'{"name":"/Common/www.ipvx.me","destination":"/Common/35.156.107.63:443","ip-protocol":"tcp","profiles":[{"name":"/Common/clientssl","context":"clientside"},{"name":"/Common/serverssl","context":"serverside"},{"name":"/Common/http"},{"name":"/Common/tcp"}],"mask":"255.255.255.255","pool":"/Common/www.ipvx.me","source-address-translation":{"type":"automap"},"translate_address":"enabled","translate_port":"enabled","source":"0.0.0.0/0"}'v.to_dict(){'name':'/Common/www.ipvx.me','destination':'/Common/35.156.107.63:443','ip-protocol':'tcp','profiles':[{'name':'/Common/clientssl','context':'clientside'},{'name':'/Common/serverssl','context':'serverside'},{'name':'/Common/http'},{'name':'/Common/tcp'}],'mask':'255.255.255.255','pool':'/Common/www.ipvx.me','source-address-translation':{'type':'automap'},'translate_address':'enabled','translate_port':'enabled','source':'0.0.0.0/0'}print(v.to_yaml())name:/Common/www.ipvx.medestination:/Common/35.156.107.63:443ip-protocol:tcpprofiles:-name:/Common/clientsslcontext:clientside-name:/Common/serversslcontext:serverside-name:/Common/http-name:/Common/tcpmask:255.255.255.255pool:/Common/www.ipvx.mesource-address-translation:type:automaptranslate_address:enabledtranslate_port:enabledsource:0.0.0.0/0v.destination.partition()'Common'v.destination.name()'35.156.107.63'v.destination.port()443v.destination.address()'35.156.107.63'v.to_toml()'destination = "/Common/35.156.107.63:443"\nip-protocol = "tcp"\nmask = "255.255.255.255"\nname = "/Common/www.ipvx.me"\npool = "/Common/www.ipvx.me"\nsource = "0.0.0.0/0"\ntranslate_address = "enabled"\ntranslate_port = "enabled"\n\n[[profiles]]\ncontext = "clientside"\nname = "/Common/clientssl"\n\n[[profiles]]\ncontext = "serverside"\nname = "/Common/serverssl"\n\n[[profiles]]\nname = "/Common/http"\n\n[[profiles]]\nname = "/Common/tcp"\n\n[source-address-translation]\ntype = "automap"\n'x=Virtual.from_toml(v.to_toml())xVS:0x7fffce11e778,name:/Common/www.ipvx.me,destination:/Common/35.156.107.63:443dir(l)['__class__','__delattr__','__dir__','__doc__','__eq__','__format__','__ge__','__getattribute__','__gt__','__hash__','__init__','__init_subclass__','__le__','__lt__','__module__','__ne__','__new__','__reduce__','__reduce_ex__','__repr__','__setattr__','__sizeof__','__str__','__subclasshook__','from_json','from_toml','from_yaml','new_default','partitions','pools','snat_pools','to_dict','to_json','to_toml','to_yaml','try_to_csv','virtual_servers']DisclaimerThis library is not affiliated with F5 Networks in any way. It is a personal project and is not supported by F5 Networks.