How to code pneumatics in VEX python code?

Hey we are a rookie team that is knew to coding, and was wondering if anyone could tell us how to code pneumatics in VEX python code?

Answering your question:

https://api.vex.com/v5/home/python/DigitalOut.html
The current pneumatics are a digital out

# Create the Brain.
brain = Brain()
# Construct a Digital Output "digout" with the
# DigitalOut class.
digout = DigitalOut(brain.three_wire_port.a)

digout.set(True)

Man, the new VEXCode API is really really good.

Long term, this may change:

On another note… I think we are expecting pneumatics in the future to use smart ports? :eyes:
https://api.vex.com/v5/home/python/Pneumatics.html

Also potentially looks like in the future there may be pneumatics that have their own air pump too: pneumatic — VEXcode Documentation

Hi again,

def when_started1():
    global myVariable
    while True:
        if controller_1.buttonUp.pressing():  //Driver preference, it is just a button to retract it.
            digital_out_b.set(False)  //This means that the pistons will retract
        if controller_1.buttonDown.pressing():  //Driver preference, it is just a button to extend it.
            digital_out_b.set(True)  //This means that the pistons will extend
        wait(5, MSEC)

Here it is.