code: def delete_project(self, pid):
          
          # allows us to call it with Project objects
          if hasattr(pid, 'id'):
              pid = pid.id
  
          # Check if pid is a number - then we assume that it is
          # projectID
          try:
              str(int(pid)) == pid
          except Exception as e:
              # pid looks like a slug, lets verify that
              r_json = self._get_json('project')
              for e in r_json:
                  if e['key'] == pid or e['name'] == pid:
                      pid = e['id']
                      break
              else:
                  # pid is not a Project
                  # not a projectID and not a slug - we raise error here
                  raise ValueError('Parameter pid="%s" is not a Project, '
                                   'projectID or slug' % pid)
  
          uri = '/rest/api/2/project/%s' % pid
          url = self._options['server'] + uri
          try:
              r = self._session.delete(
                  url, headers={'Content-Type': 'application/json'}
              )
          except JIRAError as je:
              if '403' in str(je):
                  raise JIRAError('Not enough permissions to delete project')
              if '404' in str(je):
                  raise JIRAError('Project not found in Jira')
              raise je
  
          if r.status_code == 204:
              return True
docs: Delete project from Jira.
  
          :param pid: JIRA projectID or Project or slug
          :type pid: str
          :return: True if project was deleted
          :rtype: bool
          :raises JIRAError:  If project not found or not enough permissions
          :raises ValueError: If pid parameter is not Project, slug or ProjectID