Python Code for interfacing of camera with Raspberry Pi

import picamera
import time

camera = picamera.PiCamera()
camera.capture(‘imgfile.jpg’)

camera.start_preview()
camera.vflip = True
camera.hflip = True
camera.brightness = 60

camera.start_recording(‘videofile.h264’)
time.sleep(15)                                                                                         
camera.stop_recording()