Did I find the right examples for you? yes no

All Samples(15)  |  Call(12)  |  Derive(0)  |  Import(3)

        def write_json(json_obj, filename):
    with open(filename, 'wb') as f:
        json.dump(json_obj, f)
        


src/c/o/congress-HEAD/tasks/committee_meetings.py   congress(Download)
        meetings = fetch_senate_committee_meetings(committees, options)
        print "Writing Senate meeting data to disk."
        utils.write_json(meetings, output_for("senate"))
 
    if "house" in chambers:
        print "Fetching House meetings..."
        meetings = fetch_house_committee_meetings(committees, options)
        print "Writing House meeting data to disk."
        utils.write_json(meetings, output_for("house"))

src/d/a/datablox-HEAD/engage/engage-dist/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/__init__.py   datablox(Download)
from django_config import django_config_from_validation_results, django_config_from_json
from generate_settings import generate_settings_file, simulated_install
from utils import app_module_name_to_dir, write_json, find_files, \
                  get_deployed_settings_module, import_module, \
                  get_settings_file_directory, get_python_path
                                                       VERSION,
                                                       results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        config = django_config_from_validation_results(self.django_settings_module,
                                                       VERSION, results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        results = validate_settings(self.app_dir_path, ds_mod,
                                    django_config)
        write_json(results.to_json(), self.results_file)
        results.print_final_status_message(logger)
        return results.get_return_code()    

src/e/n/engage-HEAD/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/__init__.py   engage(Download)
from django_config import django_config_from_validation_results, django_config_from_json
from generate_settings import generate_settings_file, simulated_install
from utils import app_module_name_to_dir, write_json, find_files, \
                  get_deployed_settings_module, import_module, \
                  get_settings_file_directory, get_python_path
                                                       VERSION,
                                                       results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        config = django_config_from_validation_results(self.django_settings_module,
                                                       VERSION, results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        results = validate_settings(self.app_dir_path, ds_mod,
                                    django_config)
        write_json(results.to_json(), self.results_file)
        results.print_final_status_message(logger)
        return results.get_return_code()    

src/e/n/engage-django-sdk-1.0.0/engage_django_sdk/packager/__init__.py   engage-django-sdk(Download)
from django_config import django_config_from_validation_results, django_config_from_json
from generate_settings import generate_settings_file, simulated_install
from utils import app_module_name_to_dir, write_json, find_files, \
                  get_deployed_settings_module, import_module, \
                  get_settings_file_directory, get_python_path
                                                       VERSION,
                                                       results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        config = django_config_from_validation_results(self.django_settings_module,
                                                       VERSION, results)
        write_json(config.to_json(), os.path.join(app_dir_path, DJANGO_CFG_FILENAME))
 
        # undo the changes we made
        results = validate_settings(self.app_dir_path, ds_mod,
                                    django_config)
        write_json(results.to_json(), self.results_file)
        results.print_final_status_message(logger)
        return results.get_return_code()    

src/w/h/whereonearth-airport-HEAD/bin/generate_meta.py   whereonearth-airport(Download)
 
        co_fh = open(co_path, 'w')
        utils.write_json(collection, co_fh)
        co_fh.close()