Skip to main content

A python package for login google by selenium

Project description

Google login with Selenium

Overview

This is a small package to log in to Google account with Selenium. After signin, Chrome profile of that user will be create and stored. With Chrome profile you can do so many automatic things with it.

This has been developed for testing purposes only. Any action you take using this script is strictly at your own risk. I will not be liable for any losses or damages you face using this script.

Requirement

Must have Python <= 3.9 and Google Chrome installed

Usage

pip install login_gmail_selenium

And then call

login(email, password, backup_email)

Add folder extension/ if you want custom extensions for Chrome (.crx or .zip)

Upload to pypi

  1. Organize your code into proper file hierarchy
  2. Add a LICENSE and a README.md if not already done
/demopackage
    __init__.py
    demopackage.py
    /demosubpackage
      __init__.py
      demosubpackage.py
    /tests
        test_package.py
LICENSE
setup.py
  1. Create your setup.py
import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="login_gmail_selenium",
    version="0.0.1",
    author="Minh Hoang",
    author_email="nguyenthanhdungktm@gmail.com",
    description="A python package for login google by selenium",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/ngminhhoang1412/LoginGmailSelenium",
    packages=setuptools.find_packages(),
    classifiers=(
        "Programming Language :: Python :: 3.9",
        "Operating System :: OS Independent",
        "License :: OSI Approved :: MIT License"
    ),
)
  1. Create distribution archive files

Before you begin, run the following command to update required packages:

pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel

This should create a dist/ folder in your main directory with the compressed files for your package! 5. Upload your distribution archives to PyPI

pip install --upgrade twine
python setup.py sdist bdist_wheel
twine upload dist/*

You will be prompted for your PyPI login credentials, and then the upload will begin. Now you should be able to log in to your PyPI account and see your package.

License

Copyright © 2022 MoliGroup, MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

login_gmail_selenium-0.0.2.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

login_gmail_selenium-0.0.2-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page