Skip to main content

[Mozprofile](https://github.com/mozilla/mozbase/tree/master/mozprofile) is a python tool for creating and managing profiles for Mozilla’s applications (Firefox, Thunderbird, etc.). In addition to creating profiles, mozprofile can install [addons](https://developer.mozilla.org/en/addons) and set [preferences](https://developer.mozilla.org/En/A_Brief_Guide_to_Mozilla_Preferences). Mozprofile can be utilized from the command line or as an API.

# Command Line Usage

mozprofile may be used to create profiles, set preferences in profiles, or install addons into profiles.

The profile to be operated on may be specified with the –profile switch. If a profile is not specified, one will be created in a temporary directory which will be echoed to the terminal:

(mozmill)> mozprofile /tmp/tmp4q1iEU.mozrunner (mozmill)> ls /tmp/tmp4q1iEU.mozrunner user.js

To run mozprofile from the command line enter: mozprofile –help for a list of options.

# API Usage

To use mozprofile as an API you can import [mozprofile.profile](https://github.com/mozilla/mozbase/tree/master/mozprofile/mozprofile/profile.py) and/or the [AddonManager](https://github.com/mozilla/mozbase/tree/master/mozprofile/mozprofile/addons.py).

mozprofile.profile features a generic Profile class. In addition, subclasses FirefoxProfile and ThundebirdProfile are available with preset preferences for those applications.

# Installing Addons

Addons may be installed individually or from a manifest.

Example:

from mozprofile import FirefoxProfile

# create new profile to pass to mozmill/mozrunner profile = FirefoxProfile(addons=[“adblock.xpi”])

# Setting Preferences

Preferences can be set in several ways:

  • using the API: You can pass preferences in to the Profile class’s constructor: obj = FirefoxProfile(preferences=[(“accessibility.typeaheadfind.flashBar”, 0)])

  • using a JSON blob file: mozprofile –preferences myprefs.json

  • using a .ini file: mozprofile –preferences myprefs.ini

  • via the command line: mozprofile –pref key:value –pref key:value […]

When setting preferences from an .ini file or the –pref switch, the value will be interpolated as an integer or a boolean (true/false) if possible.

# Setting Permissions

mozprofile also takes care of adding permissions to the profile. See https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/permissions.py

# Resources

Other Mozilla programs offer additional and overlapping functionality for profiles. There is also substantive documentation on profiles and their management.

Metadata

Release files for mozprofile 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mozprofile 0.1
File Size Uploaded
mozprofile-0.1.tar.gz 13.8 kB Details

Release files / mozprofile-0.1.tar.gz

Download URL mozprofile-0.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
47cda6593546e0bea443fb2ba1e5b48d7f7cc6980494ced7b4ea12f3958d4008
BLAKE2b-256 checksum
How to use checksums
6737ca649b299d79ee7ba74fa4874755dcc6ec45dc174bf4d1657c226cfda532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.0.0

1 release file

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.29

1 release file

0.28

1 release file

0.27

1 release file

0.26

1 release file

0.25

1 release file

0.24

1 release file

0.23

1 release file

0.22

1 release file

0.21

1 release file

0.20

1 release file

0.19

1 release file

0.18

1 release file

0.17

1 release file

0.16

1 release file

0.15

1 release file

0.14

1 release file

0.13

1 release file

0.12

1 release file

0.11

1 release file

0.10

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

1 release file

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page