Faker Cinema
The aim of this package is to provide Cinema Industry specific providers to allow generation of realistic sounding exhibitors, cinemas and screens.
Pre-requisites
- You need Faker
- Then you will need to add this as a provider to your Faker instance (from the faker documentation)
from faker import Faker
from faker_cinema import ExhibitorProvider, CinemaProvider, ScreenProvider, CPLProvider
fake = Faker()
fake.add_provider(ExhibitorProvider)
fake.add_provider(CinemaProvider)
fake.add_provider(ScreenProvider)
fake.add_provider(CPLProvider)
OR
- [New in 0.2.0] Just import the FakerCinema factory function:
from faker_cinema import FakerCinema
fake = FakerCinema()
Usage
Fake cinema chain name (AKA exhibitor name):
>>> fake.exhibitor()
'World Theatres Ltd'
Fake cinema name:
>>> fake.cinema()
'Golden Kino Michaelton'
Fake cinema name for a given cinema chain name:
>>> exhibitor = fake.exhibitor()
>>> [fake.cinema(exhibitor) for _ in range(3)]
['Super Cine Holdings Shannonport', 'Super Cine Holdings Karamouth', 'Super Cine Holdings South Rhondaberg']
Fake screen name:
>>> [fake.screen(number) for number in range(1, 4)]
['Screen 1', 'Screen 2 (IMAX)', 'Theatre 3 (3D)']
Fake CPL name:
>>> fake.cpl_name()
'Hodgechester_PRO-Pre-ALT_C_CA-CS_CA_VI-71-D-box-HI_2K_MRV_20150228_DTU_SMPTE-3D_VF'
Development & Testing
- Install the requirements and dev requirements:
pip install -r requirements.txt -r requirements-dev.txt
- Run py.test:
py.test
Changelog
- 0.2.0: Added CPL provider initial version and added FakerCinema factory function
- 0.1.0: Initial version with Exhibitor, Cinema and Screen functionality
License
Licensed under the MIT License.